Amendment
I've got a typo slipped in (ossid3 should be read ossid). This is a relist.
[2.2'] My replacement script would be something like this.
[tt]
'get the SID for the account to be associated with the new mailbox
dim ossid
ossid=getobject(WinNT://" & strDomain & "/" & strUserID).objectsid
strSidHex=""
for i=0 to ubound(ossid)
sbyte=right("0" & hex(ascb(midb(ossid,i+1,1))),2)
strSidHex=strSidHex & right("0" & hex(ascb(midb(ossid,i+1,1))),2)
next
'strSidHex has done and is ready to be used.
[/tt]