Top "Invoke-command" questions

Invoke-Command is a powershell cmdlet that runs commands on local and remote computers.

Multiple commands within ScriptBlock

I'm having trouble running multiple commands within a Scriptblock parameter. All documentation points towards using a semicolon for separation between …

powershell invoke-command
Invoke Command When "ENTER" Key Is Pressed In XAML

I want to invoke a command when ENTER is pressed in a TextBox. Consider the following XAML: <UserControl ... xmlns:…

silverlight xaml eventtrigger invoke-command
Powershell - Pass multiple parameters to Invoke-Command

I'm trying to write a one-liner to leverage some of the capabilities of netbackup remotely. I know how to pass …

powershell invoke-command
Powershell Start-Process msiexec on a remote machine not working

For some reason Start-Process msiexec won't work when run through invoke command on a remote machine. I looked it up …

powershell windows-installer invoke-command start-process
enter-pssession invoke-command, when to use?

I am writing a script to stop and start services in two remote servers. Here's my question, in my script …

powershell invoke-command
how to parse json response in powershell

managed to get the JSON data with $R= Invoke-WebRequest -Uri $url -Headers $headers -ContentType "application/json" -Method Get -UseBasicParsing $x = $…

powershell iteration invoke-command
powershell: script to start a program with parameters?

When i run the Powershell script below i receive the error below. How do i run programs through powershell with …

powershell authentication group-policy invoke-command
How do I pass variables with the Invoke-Command cmdlet?

I have to get Event-Logs from some servers and I don't want to read in the credentials for each server …

powershell variables invoke-command
ArgumentList parameter in Invoke-Command don't send all array

First short code, then question $session = New-PSSession -ComputerName someServer $servicesList = "Service1", "Service2", "Service3" Invoke-Command -ScriptBlock { Param ($newServicesList) Write-Host $newServicesList } -ArgumentList $…

powershell powershell-2.0 invoke-command
Start-job vs. Invoke-command -asjob

I'm trying to do basic background jobs in PowerShell 2.0, and I'm seeing different things with start-job and invoke-command -asjob. If …

powershell powershell-2.0 invoke-command start-job