$name = "notepad" Invoke-Command -ComputerName serwer -Credential $cred -ScriptBlock { Get-Process -Name $name } Invoke-Command -ComputerName serwer -Credential $cred -ScriptBlock { Param($x) Get-Process -Name $x } -ArgumentList ($name) $log="Security" $num=10 Get-EventLog $log -Newest $num Invoke-Command -ComputerName serwer -Credential $cred -ScriptBlock { Param($logName,$n) Get-EventLog $logName -Newest $n } -ArgumentList ($log,$num) help Invoke-Command get-help Invoke-Command -full