Created
December 10, 2018 09:07
-
-
Save Graham-Beer/a7f69373818a51a8df6e4886ec4f67ac to your computer and use it in GitHub Desktop.
Convert binary to text
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-BinaryToText { | |
param ( | |
[Parameter(ValueFromPipeline)] | |
[String] $string | |
) | |
process { | |
($string -split ' ' | | |
ForEach-Object { | |
[char]( | |
[convert]::ToInt32($_, 2) | |
) | |
}) -join '' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment