Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added Unregister-ScheduledJob

  • Loading branch information...
commit 42da50dd8569298f35e8ef4f5e4912116ba740da 1 parent 8ad9ec0
@dfinke authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 chapter11/StartScheduledJobIn.ps1
View
6 chapter11/StartScheduledJobIn.ps1
@@ -16,5 +16,7 @@ function Start-ScheduledJobIn {
}
cls
-ipmo PSScheduledJob -Force
-Start-ScheduledJobIn TestGetService 5 {Get-Service}
+
+$JobName = "TestGetServiceJob"
+Get-ScheduledJob -Name $JobName -ea 0 | Unregister-ScheduledJob
+Start-ScheduledJobIn $JobName 5 {Get-Service}
Please sign in to comment.
Something went wrong with that request. Please try again.