Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Scripting >> Perl >> ADSI >> How to display the full name aka. account Display Name - for a particular user

Following perl script assumes that the computer running it is already a member of the domain and the session is already authenticated by domain login. eg. use Win32::OLE; use Win32::OLE qw( in ); print GetFullname("someusername","somedomain"); sub GetFullname() { my $sMyUsername = shift; my $sMyDomain = shift; my $oUser = Win32::OLE->GetObject("WinNT://" . $sMyDomain . "/" . $sMyUsername . ",user"); $sFN = $oUser->{Fullname}; return $sFN; }
[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]