February 2019
Intermediate to advanced
626 pages
15h 51m
English
Invoke-Command may be used with a PSSession to execute a command or script on a remote system:
$session = New-PSSession -ComputerName $env:COMPUTERNAME
Invoke-Command { Get-Process -Id $PID } -Session $session
Invoke-Command has a wide variety of different uses, as shown in the command help. For example, a single command can be executed against a list of computers:
Invoke-Command { Get-Process -Id ...Read now
Unlock full access