Collections:
Other Resources:
"Start-Job" Cmdlet in Windows PowerShell
How to use "Start-Job" cmdlet in Windows PowerShell?
✍: FYIcenter.com
You can use the "Start-Job" cmdlet to start a Windows PowerShell background job on the local computer.
A Windows PowerShell background job runs a command "in the background" without interacting with the current session. When you start a background job, a job object is returned immediately, even if the job takes an extended time to complete. You can continue to work in the session without interruption while the job runs.
The job object contains useful information about the job, but it does not contain the job results. When the job completes, use the Receive-Job cmdlet to get the results of the job. For more information about background jobs, see about_Jobs.
To run a background job on a remote computer, use the AsJob parameter that is available on many cmdlets, or use the Invoke-Command cmdlet to run a Start-Job command on the remote computer. For more information, see about_Remote_Jobs.
The following example starts a background job to run the "get-process" cmdlet:
PS C:\fyicenter> start-job {get-process} Id Name PSJobTypeName State HasMoreData Command -- ---- ------------- ----- ----------- ------- 2 Job2 BackgroundJob Running True get-process
The following example starts a background job to run the "$now = get-date" script:
PS C:\fyicenter> start-job {$now = get-date} Id Name PSJobTypeName State HasMoreData Command -- ---- ------------- ----- ----------- ------- 4 Job4 BackgroundJob Running True $now = get-date
⇒ "Get-Job" Cmdlet in Windows PowerShell
⇐ What Is Windows PowerShell Background Job
2016-10-08, 3231🔥, 0💬
Popular Posts:
Can I remove startup application "YahooMessenger.exe - Yahoo Instant Messenger" to speedup my comput...
What is "UPnP Device Host" in my Windows 7 service list? And how is "UPnP Device Host" service relat...
How to unblock a publisher? 1. Open Internet Explorer. 2. Click the Tools button, and then click Int...
Why am I getting a blank page when running PHP scripts to access MySQL database? Assuming that you h...
Can I disable Windows service "Windows Image Acquisition (WIA)" to speedup my computer? Windows serv...