Question involving password expiration, please help

  • Thread starter Thread starter Louis Herndon
  • Start date Start date
L

Louis Herndon

Hello,

I need to force expire all of my users (300) due to
security problems. Is there a command line script that
will accomplish this. Most of my users will log out on
their own by the end of the day, and will consequently be
asked to change their password tomorrow morning. But some
will not log off at the end of the day. I want to make
them log off at the end of the day whether they are there
or not. Please help.
 
Hi Louis,

There are a few ways to do this. One way way off the
top of my head to log everyone off is use
the 'shutdown.exe' tool and a list of all your clients.
For example, export the computer names to a file
named "clients.txt":
MYCOMP1
MYCOMP2
etc.
etc.

Then run a batch file like this:
for /f %%a in (clients.txt) do (shutdown -l /m \\%%a)

This will force a log off on each of the specified
computers. I think it gives a 30 second warning on the
client machine.

Hope this helps,
Tony Yuhas
Microsoft
Active Directory Tools
 
Back
Top