Last active
August 29, 2015 14:00
-
-
Save hikoma/030c6ae13f627ae643f7 to your computer and use it in GitHub Desktop.
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 ConvertFrom-Base64String { | |
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory=$True, ValueFromPipeline=$True)] | |
[ValidateNotNullOrEmpty()] | |
[string] $Base64String | |
) | |
Process { | |
$bytes = [System.Convert]::FromBase64String($Base64string) | |
[System.Text.Encoding]::UTF8.GetString($bytes) | |
} | |
} | |
Function Get-WcfPipe { | |
[CmdletBinding()] | |
Param ( | |
[string] $HandleExePath = "C:\opt\SysinternalsSuite\handle.exe" | |
) | |
Process { | |
& $HandleExePath net.pipe:Ebm | Select-String net.pipe:Ebm | Foreach-Object { | |
$pipe = ConvertFrom-Base64String ($_ -split 'net.pipe:E')[1] | |
[PSCustomObject] @{ Pipe = $pipe; Handle = $_ } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment