Skip to content

Instantly share code, notes, and snippets.

@mallibone
Created February 4, 2017 11:09
Show Gist options
  • Save mallibone/ff1423c0ff626237cb879b05c4fb6086 to your computer and use it in GitHub Desktop.
Save mallibone/ff1423c0ff626237cb879b05c4fb6086 to your computer and use it in GitHub Desktop.
$currentDate = Get-Date
$messageOfTheDay = ""
if($currentDate.Day % 2 -ne 0)
{
$messageOfTheDay = "Today is an odd Day, "
}
else
{
$messageOfTheDay = "Today all should be even, "
}
switch (($currentDate.DayOfWeek))
{
"Monday" { $messageOfTheDay = $messageOfTheDay + "that being said you should be working..." }
"Tuesday" { $messageOfTheDay = $messageOfTheDay + "that being said you should be working..." }
"Wednesday" { $messageOfTheDay = $messageOfTheDay + "that being said you should be working..." }
"Thursday" { $messageOfTheDay = $messageOfTheDay + "that being said you should be working..." }
"Friday" { $messageOfTheDay = $messageOfTheDay + "that being said you should be working..." }
"Saturday" { $messageOfTheDay = $messageOfTheDay + "yay it's the Weekend!!!" }
"Sunday" { $messageOfTheDay = $messageOfTheDay + "yay it's the Weekend!!!" }
default { $messageOfTheDay = $messageOfTheDay + "This script only knows the 7 weekdays...." }
}
echo $messageOfTheDay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment