I am trying to disable the Guest accounts on all the pc's in my network (300 pc) I am having trouble with the AdminMisc::UserSetMiscAttributes this is what i have tried to disable it on my local pc and it doesn;t seem to work
I need to get this done asap (Examiners are coming)
You can use AdminMisc or NetAdmin doesn't matter to me
Update My AdminMisc is not working so that is part of my problem
use Win32;
use Win32::NetAdmin;
use Win32::AdminMisc;
print "Enter the (ip or name) of the remote PC\n";
$server = (<stdin>);
chomp($server);
$user = "Guest";
my %users;
my %detail;
Win32::NetAdmin::GetUsers($server, FILTER_NORMAL_ACCOUNT, \%users);
foreach (%users) {
print "$_\n";
}
Win32::AdminMisc::UserGetMiscAttributes ($server, $user, \%detail);
$Hash{USER_FLAGS} = $Hash{USER_FLAGS} | UF_ACCOUNTDISABLE;
Win32::AdminMisc::UserSetMiscAttributes ($server, $user, USER_FLAGS, $
+Hash{USER_FLAGS} );
2006-03-15 Retitled by Corion, as per Monastery guidelines
Original title: 'Help'