Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Function Get-DateRange
{ [CmdletBinding()]
Param (
[datetime]$Start = (Get-Date),
[datetime]$End = (Get-Date)
)
ForEach ($Num in (0..((New-TimeSpan -Start $Start -End $End).Days)))
{ $Start.AddDays($Num)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment