Here are a couple of ways to convert decimal to hexadecimal notation:

$value = 255

[Convert]::ToString($value, 16)
'{0:x}' -f $value
'{0:X}' -f $value
'{0:x10}' -f $value
'{0:X10}' -f $value

Twitter This Tip! ReTweet this Tip!

Anonymous