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, ∼6399🔥, 0💬
Popular Posts:
What is the installed program "Apple Application Support (64-bit)" on my Windows 7 computer? "Apple ...
How to unblock a publisher? 1. Open Internet Explorer. 2. Click the Tools button, and then click Int...
What is the "svchost.exe (Host Process for Windows Services)" system executable program on Windows S...
How to select the second keyboard layout during the Windows 10 setup process? After your Windows 10 ...
Where to find tutorials on using Windows Server 2012? I want to learn how to use Windows Server 2012...