remoting
$session = New-PSSession -ComputerName server01
Invoke-Command -Session $session -ScriptBlock { Get-Process }
Remove-PSSession $session
Why it is different
PowerShell remoting sends serialized objects The remote command runs in a session The result comes back as an object, not text to parse
WinRM
WinRM is the transport HTTPS is the safer option WinRM over HTTP inside a trusted network is common, over the internet it is not
Sessions
Create a session once and reuse it
Repeated Invoke-Command with a new session pays connection overhead each time
Next
Security in 09 security
Test this in your lab first
Posted