Hi all,
Hopefully someone could help me with a small problem that im having, part of one of my
scripts uses functions from Win32::NetAdmin and it works fine when running from a
windows 2000 pc but not an NT4 pc.
Basically the script takes the name of a pc as input, lists the members of the local
administrator group and then gives the user some options such as removing users,
adding users, or setting the group back so that it only contains our companies default
setting for local admin groups.
The script runs ok on a NT4 machine, but when it comes to the subroutine for
retreiving and printing the local admin group members, nothing is output to the
screen. It the OS of the target PC does not make any difference. Running on a w2k
works perfectly, and never works on NT4.
A sample subroutine is below, I can't see much wrong with it. I'm wondering if there
is a problem using the NetAdmin module on NT4 machines ??
Any help would be greatly appreciated.
Many thanks.
Adrian.
-
sub showMembers
{
$console->Write("\n\n $pcName`s local administrator group contains: \n\n");
Win32::NetAdmin::LocalGroupGetMembersWithDomain("$pcName", "Administrators", \@users);
for (my $i=0; $i<@users; $i++){
$console->Write(" $users[$i]\n");
}
$console->Write("\n\n");
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]