Collections:
Other Resources:
"Invoke-Command -AsJob" - Remote Background Jobs in PowerShell
How to start a background job on a remote computer in Windows PowerShell?
✍: FYIcenter.com
You can use the "Invoke-Command -AsJob" cmdlet to start a background job on
a remote computer.
Actually, the "Invoke-Command -AsJob" cmdlet is creating a local background job that runs the specified command on a remote computer. So "Invoke-Command office-server -AsJob {...}" is similar to "Start-Job {Invoke-Command office-server {...}}".
Here is an example of using the "Invoke-Command -AsJob" cmdlet:
PS C:\fyicenter>Invoke-Command office-server -ScriptBlock {Get-EventLog system} -AsJob
Id Name State HasMoreData Location Command
--- ---- ----- ----- ----------- ---------------
1 Job1 Running True office-server Get-EventLog system
⇒ Introduction of Windows PowerShell ISE
⇐ "Remove-Job" Cmdlet in Windows PowerShell
2016-10-05, ∼5963🔥, 0💬
Popular Posts:
Whenever I try to open the mail app I get a white screen with a grey banner that says Mail Can't Ope...
What is msdxm.ocx - Windows Media Player 2 ActiveX Control? msdxm.ocx is installed as an ActiveX Con...
What is the file extension .VOB (DVD-Video Object or Versioned Object Base)? .VOB is the file extens...
How to use "query user" to find out who is logged in to my Windows 7 computer? If you allow remote l...
What is a startup application on your Windows system? A startup application is a software applicatio...