This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Write-Host "Testing Azure Script Extension" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $feed = "http://channel9.msdn.com/Shows/Azure-Friday/feed/mp4high" | |
| $destination = "AzureFriday" | |
| mkdir "~\Desktop\${destination}" | |
| cd "~\Desktop\${destination}" | |
| $a = ([xml](new-object net.webclient).downloadstring($feed)) | |
| $a.rss.channel.item | foreach{ | |
| $url = New-Object System.Uri($_.enclosure.url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Test-Url { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [String] $Url | |
| ) | |
| Process { | |
| if ([system.uri]::IsWellFormedUriString($Url,[System.UriKind]::Absolute)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Test-Url { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [String] $Url, | |
| [Parameter()] | |
| [Switch] $ReturnUri | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Test-Url { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [String] $Url, | |
| [Parameter()] | |
| [Switch] $ReturnUri | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Test-Url { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [String] $Url, | |
| [Parameter()] | |
| [Switch] $ReturnUri | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Test-Url { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [String] $Url | |
| ) | |
| Process { | |
| if ([system.uri]::IsWellFormedUriString($Url,[System.UriKind]::Absolute)) { | |
| $true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Open-FWLink { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| $LinkID | |
| ) | |
| Start-Process "http://go.microsoft.com/fwlink/?LinkID=${LinkID}" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Reset-AzureVMUserPassword { | |
| param ( | |
| [String] | |
| $VMName, | |
| [String] | |
| $ServiceName, | |
| [PSCredential] | |
| $Credential |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Get-AzureStatus { | |
| $response = Invoke-RestMethod -Uri 'http://azure.microsoft.com/en-us/status/feed/' | |
| if ($response) { | |
| foreach ($item in $response) { | |
| Write-Host "$($item.Title) : " -NoNewline | |
| Write-Host -ForegroundColor Red "$($item.Description)" | |
| } | |
| } else { | |
| Write-Host -ForegroundColor Green "All is well!" | |
| } |
OlderNewer