PowerShell script to create folders for every month

PowerShell script to create folders for every month

$start = Get-Date "01/01/2023"
$end = Get-Date "12/31/2023"
$current = $start
$counter = 1

while ($current -le $end) {
  $month = $counter.ToString("00") , $current.ToString("MMMM")
  New-Item -ItemType Directory -Path ".\$month"
  $current = $current.AddMonths(1)
  $counter++
}