Invoke-Command

From UVOO Tech Wiki
Revision as of 16:38, 11 January 2021 by Busk (talk | contribs) (Created page with "Running command or local script on remote host ``` Invoke-Command -ComputerName $host -ScriptBlock { Get-ChildItem C:\ } -credential $username Invoke-Command -ComputerName $h...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Running command or local script on remote host

Invoke-Command -ComputerName $host -ScriptBlock { Get-ChildItem C:\ } -credential $username

Invoke-Command -ComputerName $host-f C:\tmp\local-file-on-remote.ps1