Powershell Tip #137: Convert number to binary By powershellgu | November 18, 2018 2 Comments Tip: You can convert a number (64) to binary (1000000). PowerShell # Decimal > Binary [Convert]::ToString(64,2) # Binary > Decimal [Convert]::ToInt32('1000000',2) 12345 # Decimal > Binary[Convert]::ToString(64,2) # Binary > Decimal[Convert]::ToInt32('1000000',2) You can see the overload defintions of the ToString method from the Convert class:
Pingback: Powershell Tip #136: Read first and last byte of a file – Powershell Guru
Pingback: Powershell Tip #138: Determine the location of the current script – Powershell Guru