I think you are missing the proper object:

$oADsSid = CreateObject("ADsSid")
$oADsSid.SetAS(1,$HexSid)
$GetADsPathFromHexSid=$oADsSid.GetAS(5)

This does the opposite of what you are doing.
_________________________
Home page: http://www.kixhelp.com/hb/