Powershell v2 tips–All the Job commands (quick reference)

 

I’m a red fish, so I wrote the Powershell’s Job commands here so I’ll have a repository.

An other way to list the Job commands is to type get-command *-job or get-command –Noun job

  • Start-Job :

Start-Job -ScriptBlock {dir –path c:windows –rec}

Start-Job -Filepath c:scriptssample.ps1

Invoke-Command -computername s1 `

-scriptblock {get-eventlog system} –asjob

 

  • Get-Job
  • Receive Job [-keep]
  • Wait-Job
  • Stop-Job

Get-Job –name n*| Stop-Job

Stop-Job *

  • Remove-Job