Skip to content

Instantly share code, notes, and snippets.

View cadayton's full-sized avatar

Craig Dayton cadayton

View GitHub Profile
function Get-NameInBinary {
param(
[parameter(DontShow)] # hide paramter to allow read host to promt for name(s)
[string]$name = $(read-host -Prompt "Enter Name(s)")
)
# Pass name from function to screen
"Your Name '{0}' in Binary is : " -f $name
# get the value of whitespace in binary to seperate names, surnames or middle names