title: Getting the binary value of a character string in Powershell
body: <pre><code>$getInput = Read-Host "ASCII or Binary? `n"
  $getInput = $getInput.toLower()
  
  if($getInput -eq "ascii"){
  
      ""
  
      #Write-Host "Type In Your ASCII" -backgroundcolor "black" 
      $getAscii = Read-Host "Type In Your ASCII`n" 
      ""
      ""
      $readAscii = @($getAscii)
      [byte[]]$outBytes = $readAscii 
  
  }
  elseif($getInput -eq "binary"){
  
  }
  else{
      Write-Host "Wrong Input... [ASCII] or [BINARY]" -backgroundcolor "red" -foregroundcolor "white"
  }
  </code></pre>
  
  <p>I want to be able to get a users paragraph or whatever string they put in and convert it to binary. The <code>[conver]::toString($getAscii,2)</code> only works for integers. </p>