PC Review


Reply
Thread Tools Rate Thread

Disable Login

 
 
=?Utf-8?B?QWxpIFBhcmFjaGE=?=
Guest
Posts: n/a
 
      7th Sep 2005
Dear
I want to block all users in my domain who did not log on since
last 15 days.I need any script ? or domain controller gives any policy?

Thanks in advance.
Muhammad Ali Paracha
MCSE , MCSA , CCNA , CCNP
 
Reply With Quote
 
 
 
 
Paul Hinsberg
Guest
Posts: n/a
 
      25th Oct 2005
Well... it really isn't a script, it is more like a single line:

C:\>For /F %I in ('dsquery user -inactive 2 -limit 1000') do dsrm
%I -noprompt

dsquery and dsrm are part of the DS command set used to manage Active
Directory in Windows 2003. You can install the command set on a Windows XP
workstaiton if you like by running the AdminPAK.msi from the Windows 2003
CD.

The command above uses the DSQUERY to search for users you have been
inactive for the last 2 weeks ( "-inactive 2" ). The listing defaults to
100, but if you put the "-limit 1000" the list can be as long as 1000. The
result is the building of a list of DSN's that are funneled to the DSRM, DS
ReMove Object. The "-noprompt" prevents the prompting of "Are you sure?"
for each deletion. To run DSQUERY you only need Domain User rights. To run
the DSRM you will need Domain Administrator privleges.

Two weeks is not a long time - a person on vacation could be gone two weeks.
Make sure that is the time period you want, because once the account is gone
only a restore will bring it back.

Paul Hinsberg, MCSE




"Ali Paracha" <(E-Mail Removed)> wrote in message
news:1CFCCAFD-0A93-4AAA-8DED-(E-Mail Removed)...
> Dear
> I want to block all users in my domain who did not log on since
> last 15 days.I need any script ? or domain controller gives any policy?
>
> Thanks in advance.
> Muhammad Ali Paracha
> MCSE , MCSA , CCNA , CCNP



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Disable Login Dave Patrick Microsoft Windows 2000 0 12th Apr 2005 10:52 PM
Disable login =?Utf-8?B?QmV0dGVCb29w?= Windows XP Configuration 4 22nd Jan 2005 03:35 AM
Disable login? =?Utf-8?B?QWRhbQ==?= Microsoft Windows 2000 2 15th Nov 2004 06:57 PM
Disable login Chuck Windows XP Security 0 23rd Aug 2003 02:22 AM
Disable Windows Login Screen- Login Automatically Arnold Gladson Windows XP Customization 1 19th Aug 2003 09:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:44 AM.