Skip to content

Commit

Permalink
accounted for 1 scheduled task
Browse files Browse the repository at this point in the history
  • Loading branch information
adbertram authored Jul 29, 2018
1 parent 1c4f7bf commit bf0ab82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Scheduled Tasks/Move-ScheduledTask.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ begin {
try {
## Get all of the scheduled paths not intentionally excluded from the localhost
$SrcSchTasks = Get-MyScheduledTask | where { $ExcludePaths -notcontains $_.Path }
Write-Verbose "Found $($SrcSchTasks.Count) scheduled tasks on localhost to migrate"
Write-Verbose "Found $(@($SrcSchTasks).Count) scheduled tasks on localhost to migrate"
## If there's no scheduled tasks, exit
if (!$SrcSchTasks) {
throw "No scheduled tasks found on localhost"
Expand All @@ -86,7 +86,7 @@ begin {

## Find all scheduled tasks on the destination server with the full path in order to not overwrite these later
$BeforeDestSchTasks = Get-MyScheduledTask -Computername $DestinationComputername | Select-Object -ExpandProperty Path
Write-Verbose "Found $($BeforeDestSchTasks.Count) scheduled tasks on destination computer pre-migration"
Write-Verbose "Found $(@($BeforeDestSchTasks).Count) scheduled tasks on destination computer pre-migration"

} catch {
Write-Error $_.Exception.Message
Expand Down

0 comments on commit bf0ab82

Please sign in to comment.