Quantcast
Channel: PowerShell.org » All Posts
Browsing all 13067 articles
Browse latest View live

Reply To: using wildcards with add-type

Thanks, I was originally going to use LoadWithpartialName, but read that it was being deprecated.

View Article


Reply To: Problem ftp files in a fold with space in it's name.

Hi Don, Thanks for the responds. I am actually look to set up a windows schedule task and have files copied from a third party ftp server to our server so we can then load the data into the database....

View Article


Reply To: Problem ftp files in a fold with space in it's name.

PowerShell does not include a native ability to talk to an FTP server. There might be something FTP-related in the underlying .NET Framework you could use (I’m not sure). In the past I’ve done this by...

View Article

Reply To: Problem ftp files in a fold with space in it's name.

Thanks again! I was starting to wonder that. I want to thank you very much for your time. I have come to the same conclusion. As for the FTP protocol, I don’t understand how someone would actually...

View Article

Reply To: Invoke-Command with ; in script

Hey sir, im getting the same thing. It runs. takes a few seconds to complete, but doesnt show any results of it running (and the package doesnt run) can i confirm im running it like you suggested....

View Article


Reply To: using wildcards with add-type

Yeah, that command has been in the “being deprecated” state for a while. I’ve used it in a pinch when nothing else seemed to present a better option though. What about the second question for...

View Article

Reply To: Invoke-Command with ; in script

Oh, I see one problem that you’ll need to correct. Instead of this: invoke-command -computername PL-SSIS -scriptblock { $ExecutionContext.InvokeCommand.NewScriptBlock($sb_string4) } You want to do...

View Article

AD module remoting problems

I have a windows server 2003 domain controller and a 2008 r2 dfs server. I am trying to run a script to update a computers description in AD.So far I have $Session = New-PSSession -Computername...

View Article


Reply To: Invoke-Command with ; in script

its a Christmas miracle! it works (well the job fails, but thats my bad not yours!) you are a jedi sir! ty… Working code! $sb_string4 = ‘DTEXEC –% /DTS “\”\MSDB\Example\test\”" /SERVER “\”PL-SSIS\”"...

View Article


Invoke-Command to set PSModulePath

Hi, I’m calling Invoke-Command to run [Environment]::SetEnvironmentVariable(“PSModulePath”, $old + “;c:\test”, “Machine”) on a remote machine. With a RDP session running on the same machine, starting...

View Article

AD GP Script

Hi guys, does anyone know of a good working script that will pull all the GP’s on a specific AD container and sub-containers and generate an html report?

View Article

Image may be NSFW.
Clik here to view.

Reply To: using wildcards with add-type

You can enumerate the GAC and do your own pattern matching to find the actual assembly name. It looks like you either need to use P/Invoke to call methods of the native GAC API for that, or have a...

View Article

Using credential param as optional..

So I have a function that I am building to get inventory information from various computers on our network. One of the parameters for this is Credential. I am doing four WMI queries (so far) to grab...

View Article


Reply To: Using credential param as optional..

I don’t know if it’s “better,” but you can certainly do: if ($PSBoundParameters.ContainsKey('credential')) { # you have one } else { # you don't }

View Article

Reply To: Invoke-Command to set PSModulePath

This may have something to do with how a Remoting session is spun up. You’re not actually logging on interactively; you’re sending commands to a service. If the service doesn’t have a full environment...

View Article


Reply To: AD module remoting problems

You can’t install the ActiveDirectory module on 2003. However, the module needs to talk to a Web service, which does not come with 2003. http://www.microsoft.com/en-us/download/details.aspx?id=2852...

View Article

Reply To: AD module remoting problems

I should also point out that what you’re doing won’t work by default even if 2003 has the gateway installed. You’re remoting to Server01, which gets your credential. That credential can’t go any...

View Article


Reply To: Modify Custom AD attribute

For the benefit of anyone that finds themselves reading this thread, I discovered the problem: The custom attribute I created had an incorrect syntax type. I must have clicked UTC Time instead of...

View Article

Reply To: AD GP Script

As a starting point, you could try getting rid of the SearchBase and SearchScope options, and just use it this way: Get-ADOrganizationalUnit -Filter * | ForEach-Object { foreach ($gpoDN in...

View Article

Poll: Interactive versus Script

I’m just curious: how do you use PowerShell most often? A) I sit in the shell and execute cmdlets and tasks interactively or B) I have an editor open all the time and write scripts Of course, we all...

View Article
Browsing all 13067 articles
Browse latest View live