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, ∼6032🔥, 0💬
Popular Posts:
What are default Startup Programs on a Windows 7 Home Premium computer? If you are running a Windows...
What is smss.exe process - Windows NT Session Manager? Process smss.exe is part of Windows system. I...
Can I disable Windows service "Network Associates Task Manager" to speedup my computer? Third party ...
What are required to use wireless routers to connect to the Internet? If you want to connect to the ...
How to connect your computer to a wireless router? Here are the steps of how to connect your compute...