go ahead... be a heretic | |
PerlMonks |
Re: Getting windows account nameby pKai (Priest) |
on Apr 18, 2007 at 13:14 UTC ( [id://610764]=note: print w/replies, xml ) | Need Help?? |
Assuming you are on an ActiveState Perl:
In addition to the informative thread marto referred to above, which points to Win32::LoginName, knowing the domain an accounts comes from might be of interest too, especially in a bigger AD environment (forest). Also note, that ActiveState's perl on Windows is special, with regard to the Win32 module, insofar as it distinguishes between "[CORE]" functions and others. Those [CORE] functions are available, even without a "use Win32;" (LoginName and DomainName among them). More information on Win32 functions is available from the cmd command line with perldoc Win32.
In Section
Seekers of Perl Wisdom
|
|