in reply to getting UserSID in Windows

Something like
use Win32::OLE; use Win32::OLE::Const ('Active DS'); my $user = Win32::OLE->GetObject("LDAP://$distinguishedName"); my $SID = $user->{objectSID};
or words to that effect should do it.