Skip to content

Instantly share code, notes, and snippets.

@martin9700
Created July 24, 2014 14:23
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
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