in reply to getting UserSID in Windows
The Windows API function LookupAccountName returns a SID structure, but somehow I can't find the CPAN digest which reportedly implements that.)
Arbitrary Windows API functions can be called using Win32::API.