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'


In reply to Disable Guest Accounts on Win32 PC's by SteveS832001

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.