#!/usr/bin/perl use strict; use warnings; use Win32::NetAdmin qw( UserGetAttributes ); my $server = ""; my $username = 'username'; my $password = 'password'; my $passwordage = 0; my $privilege = USER_PRIV_USER; my $homeDir = 'c:\\'; my $comment = 'The home dir for user'; my $flags = UF_SCRIPT; my $scriptpath = 'C:\\'; Win32::NetAdmin::UserGetAttributes( "", $username, my $Getpassword, my $Getpasswordage, my $Getprivilege, my $GethomeDir, my $Getcomment, my $Getflags, my $Getscriptpath ); print "The home dir for user, $username is $homeDir\n";