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 New-RandomPass { | |
<# | |
.Synopsis | |
Generates and returns a suitably secure password | |
.EXAMPLE | |
New-RandomPass | |
Returns a random password as a SecureString object | |
.EXAMPLE |
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 New-QueryString { | |
<# | |
.SYNOPSIS | |
Turn a hashtable into a URI querystring | |
.DESCRIPTION | |
Turn a hashtable into a URI querystring | |
.PARAMETER QueryParameter | |
The hashtable to transform |
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 binaryout { | |
<# | |
.SYNOPSIS | |
Workaround for PowerShell processing the output of all external programs as strings | |
.DESCRIPTION | |
PowerShell treats any output from an external program as string which should be | |
split whenever it sees LF or CR LF. As a workround this calls the program with | |
Start-Process and redirects standard output to a file - on completion the file | |
is read and sent as a bytestream to the next process. |