- Mar 17, 2013
- 27
- 0
- 0
This being a WP forum there must be some Windows PowerShell geeks here as well.  Below is a PowerShell script I made to let you know when GDR2 for Nokia Lumia 920 on AT&T is out.  Run this script as a scheduled task for best results.
	
	
	
		
				
			
		Code:
	
	If ((Get-Command -Name * | Where-Object {$_.Name -eq "Invoke-WebRequest"}) -ne $Null)
	{
		While ($True -eq $True)
			{
				[String] $URI = "http://www.nokia.com/global/support/software-update/wp8-software-update/availability-in-north-america/"
				[String] $Status = '<tr><td rowspan="1" colspan="1" data-title="Product">Lumia 920</td><td rowspan="1" colspan="1" data-title="Description">AT&T</td><td rowspan="1" colspan="1" data-title="Latest version">1232.5962.1314.0001</td><td rowspan="1" colspan="1" data-title="Lumia Amber update">Waiting for approval</td></tr>'
				$HTML = Invoke-WebRequest -URI $URI
				[Bool] $HTML = Select-String -InputObject $HTML.RawContent -Pattern $Status
				If ($HTML -eq $False)
					{
						[Int] $Int = 0
						While($Int -le 5)
							{
								[System.Media.SystemSounds]::Beep.Play()
								Start-Sleep -Seconds 1
								[System.Media.SystemSounds]::Hand.Play()
								Start-Sleep -Seconds 1
								$Int++
							}
						[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
						[System.Windows.Forms.MessageBox]::Show("GDR2 (Amder) may be out!" , "GDR2")
					}
				Else
					{
						Start-Sleep -Seconds 900 #15 Minutes
					}
			}
	}
Else
	{
		Write-Host "Powershell 3 or Higher Requested"
	} 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		
 Facebook
Facebook Instagram
Instagram