Skip to content

Instantly share code, notes, and snippets.

@martin9700
Created July 24, 2014 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save martin9700/554f812d062289054c5d to your computer and use it in GitHub Desktop.
Save martin9700/554f812d062289054c5d to your computer and use it in GitHub Desktop.
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