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
# gets past a problem in Invoke-WebRequest which causes issues with UTF-8 Responses (such as those from raw.githubusercontent.com) | |
Function Invoke-UTF8WebRequest | |
{ | |
# based loosely on https://gist.github.com/angel-vladov/9482676 | |
param($uri) | |
[Net.HttpWebRequest]$req = [Net.WebRequest]::Create($Uri) | |
[Net.HttpWebResponse]$res = $req.GetResponse() | |
$sr = [IO.StreamReader]::new($res.GetResponseStream()) | |
$body = $sr.ReadToEnd() |
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
# Gets all Route53 DNS records for the requested Zone | |
Function Get-R53ResourceRecordList | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[ValidateScript( | |
{ | |
$_ -like "*." |
NewerOlder