Last active
May 21, 2017 10:02
-
-
Save vijayjt/17aab662d19a8fe0a855f44eaf048cbd to your computer and use it in GitHub Desktop.
Return the regions in the Azure Public IP XML file
This file contains 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-AzurePubicIpXMLRegionList | |
{ | |
<# | |
.SYNOPSIS | |
The function takes the Azure Public IP address XML file and returns an array of region names | |
.DESCRIPTION | |
The function takes the Azure Public IP address XML file and returns an array of region names | |
.PARAMETER AzureIPRangeXMLFile | |
The XML file containing the Azure IP ranges. | |
.EXAMPLE | |
Get-AzurePubicIpXMLRegionList -AzureIPRangeXMLFile C:\AzurePublicIPs.xml | |
#> | |
[CmdletBinding()] | |
[OutputType([object[]])] | |
Param( | |
[Parameter(Mandatory=$true,HelpMessage='Enter the path to the Azure IP ranges XML file.')] | |
[String]$AzureIPRangeXMLFile | |
) | |
$AzureIPRanges = [xml] (Get-Content $AzureIPRangeXMLFile) | |
return $AzureIPRanges.AzurePublicIpAddresses.Region.Name | |
}#EndFuncion Function Get-AzurePubicIpXMLRegionList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment