Re: Disable all accounts who haven't logged on prior to certain date
- From: "Spin" <Spin@xxxxxxxx>
- Date: Sat, 4 Feb 2006 16:19:15 -0500
This a Windows 2000 domain Joe. I have exactly 1500 accounts I want to
touch. Will an oldcmp CMD line work here?
--
Spin
"Joe Richards [MVP]" <humorexpress@xxxxxxxxxxx> wrote in message
news:%23EXUaecKGHA.1424@xxxxxxxxxxxxxxxxxxxxxxx
OldCmp doesn't work with fixed dates, it is relative, so once you know how
old the oldest account you want that doesn't get touched, use the -age
switch to specify that value. You also want the -users switch to tell
oldcmp to do users instead of computers.
The hardest part is that oldcmp doesn't work with lastlogon, it works with
pwdlastset or lastlogontimestamp (if you are in domain functional mode for
the domain). So if you are in domain functional mode, you specify
the -llts switch, if you aren't, then you will be going against passwords.
Finally, I put a lot of safeties into place to protect people from
completely screwing themselves like I have seen with folks using dsquery |
dsmod. To that end you specify the maximum number of objects that should
be touched with -safety, like -safety 1000 for 1000 objects. If you don't
care and want to hit every account that matches the query, use -unsafe.
joe
--
Joe Richards Microsoft MVP Windows Server Directory Services
Author of O'Reilly Active Directory Third Edition
www.joeware.net
---O'Reilly Active Directory Third Edition now available---
http://www.joeware.net/win/ad3e.htm
Spin wrote:
Thank you for your response. That is the tool, but what would be the
command-line one would use to disable all accounts who haven't logged on
prior to June 1, 2005?
.
- Follow-Ups:
- Re: Disable all accounts who haven't logged on prior to certain date
- From: Joe Richards [MVP]
- Re: Disable all accounts who haven't logged on prior to certain date
- References:
- Disable all accounts who haven't logged on prior to certain date
- From: Spin
- Re: Disable all accounts who haven't logged on prior to certain date
- From: Jorge de Almeida Pinto [MVP]
- Re: Disable all accounts who haven't logged on prior to certain date
- From: Spin
- Re: Disable all accounts who haven't logged on prior to certain date
- From: Joe Richards [MVP]
- Disable all accounts who haven't logged on prior to certain date
- Prev by Date: Re: Disable all accounts who haven't logged on prior to certain date
- Next by Date: Re: Create Printer Port on Domain Controller
- Previous by thread: Re: Disable all accounts who haven't logged on prior to certain date
- Next by thread: Re: Disable all accounts who haven't logged on prior to certain date
- Index(es):
Relevant Pages
|