Skip to content

Instantly share code, notes, and snippets.

@billkindle
Last active April 17, 2018 03:02
Show Gist options
  • Save billkindle/3842f613b250945190e35ce5a4b54b2d to your computer and use it in GitHub Desktop.
Save billkindle/3842f613b250945190e35ce5a4b54b2d to your computer and use it in GitHub Desktop.
Get-DaysLeftPwshSummit.ps1 function for PowerShell Profile or standalone use.
function Get-DaysLeftPwshSummit {
<#
Created By: Bill Kindle
Twitter: @BillKindle
Description:
This is just a simple function you can add to your PowerShell profile
as a reminder to register for PowerShell+DevOps Summit.
#>
$Year = (Get-Date).Year
$Today = (get-date).DayOfYear
# When this script was created in 2018, next registration day was November 1st.
$RegDay = (get-date -Month 11 -Day 1 -Year $Year)
$Days = ($RegDay.DayOfYear - $Today)
# write-Host is terrible, but hey, you are supposed to be looking at this.
Write-Host -ForegroundColor Black -Backgroundcolor White `
"The next PowerShell + DevOps Summit is April 29th 2019"
Write-Host -ForegroundColor White -BackgroundColor Blue `
"There are $Days days left until PowerShell Summit 2019 Registration opens on $(Get-Date -date $RegDay.Date -Format MM/dd/yyyy)!"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment