Skip to content

Commit 7312308

Browse files
committed
Fixed bug with different OS versions returning repeat interval differently
1 parent c8a6627 commit 7312308

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.psm1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ function Get-TargetResource
9696
$returnScheduleType = "Daily"
9797
[System.Uint32]$returnInveral = $repetition.Interval -replace "P" -replace "D"
9898
}
99+
if ($repetition.Duration -eq $null -and $repetition.Interval -like "P*D*")
100+
{
101+
$returnScheduleType = "Daily"
102+
[System.Uint32]$returnInveral = $repetition.Interval.Substring(0, $repetition.Interval.IndexOf('D')) -replace "P"
103+
}
99104
if (($repetition.Duration -eq "P1D" -or $repetition.Duration -eq $null) `
100105
-and $repetition.Interval -like "PT*H")
101106
{

0 commit comments

Comments
 (0)