Code snipped to check if the day of the week is required day.

if ((Get-Date).DayOfWeek -eq 'Monday') {
    Write-Host "Today is Monday!"
} else {
    Write-Host "Today is not Monday."
}

Categorized in:

Powershell,

Last Update: May 17, 2024