The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

BExner (1) [Avatar] Offline
#1
I tried to display an array of bytes in hexadecimal representation and was surprised that only one byte had been displayed. After checking the length of the array the same command displayed the complete array.

$bytes = 1,2,3,4,5
'{0smilie2}' -f $bytes # shows only the first byte
$a = $bytes.Length
'{0smilie2}' -f $bytes # now shows all 5 bytes

Is this a Powershell bug or did I make a mistake?