I need a PowerShell function to add 23 months to the current date, but set the day to the first.
I tried a while loop to subtract the days, but I have had no luck. I have the month part figured out, but I need to set the $current.day to a constant 1.
function Update-Date {
$current = Get-Date
$current.AddMonths(11)
$current.AddYears(1)
$current.Day(1)
}