Skip to content

Instantly share code, notes, and snippets.

@lazywinadmin
Created February 9, 2016 00:58
Show Gist options
  • Save lazywinadmin/c622864c5296cc4c1c54 to your computer and use it in GitHub Desktop.
Save lazywinadmin/c622864c5296cc4c1c54 to your computer and use it in GitHub Desktop.
Watch PowerShell blog for updates
$Regex = [regex]'<strong>Updated\s01/20/2016</strong>'
do {
$Site = Invoke-WebRequest -Uri 'https://blogs.msdn.microsoft.com/powershell/2015/12/23/windows-management-framework-wmf-5-0-currently-removed-from-download-center/'
Start-Sleep -Seconds 60
} while ($Site.Content -match $Regex)
while (1) {
[System.Console]::Beep()
Get-Command -Name Write* -CommandType Cmdlet | Where-Object {$_.Name -notmatch 'Event|Progress|Debug'} | ForEach-Object {
Invoke-Expression "$($_.Name) 'There is news on WMF 5.0' -Verbose"
}
Start-Sleep -Seconds 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment