I read somewhere, I forgot, there is command line tool to list all computer
accounts & also can delete computer accounts not active morethan specified
days with additional arguments with that command. Any help
I read somewhere, I forgot, there is command line tool to list all computer
accounts & also can delete computer accounts not active morethan specified
days with additional arguments with that command. Any help
"Sohail" <Sohail@discussions.microsoft.com> wrote in message
news:CA651C7A-66B9-4B15-9D22-44DF1911E52B@microsoft.com...
>I read somewhere, I forgot, there is command line tool to list all computer
> accounts & also can delete computer accounts not active morethan specified
> days with additional arguments with that command. Any help
If you have a small number of users then the command
net user UserName [/domain]
would be adequate. If you have a large number then you
will probably find a suitable scripting solution here:
http://www.rlmueller.net/UserAttributes.htm
If you need to post again, remember to state if you operate
in a domain/AD environment.
"Sohail" <Sohail@discussions.microsoft.com> wrote in message
news:CA651C7A-66B9-4B15-9D22-44DF1911E52B@microsoft.com...
>I read somewhere, I forgot, there is command line tool to list all computer
> accounts & also can delete computer accounts not active morethan specified
> days with additional arguments with that command. Any help
You may be referring to Joe Richards' free oldcmp utility:
http://www.joeware.net/freetools/tools/oldcmp/index.htm
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
m asking for computer account i remember i read about dnsquery or dns command
(.exe file) with some arguments
"Pegasus (MVP)" wrote:
>
> "Sohail" <Sohail@discussions.microsoft.com> wrote in message
> news:CA651C7A-66B9-4B15-9D22-44DF1911E52B@microsoft.com...
> >I read somewhere, I forgot, there is command line tool to list all computer
> > accounts & also can delete computer accounts not active morethan specified
> > days with additional arguments with that command. Any help
>
> If you have a small number of users then the command
>
> net user UserName [/domain]
>
> would be adequate. If you have a large number then you
> will probably find a suitable scripting solution here:
>
> http://www.rlmueller.net/UserAttributes.htm
>
> If you need to post again, remember to state if you operate
> in a domain/AD environment.
>
>
>
hey sohail
dsquery computer -limit 0 -inactive 10 >C:\TenWeeks.txt
this command queries computer accounts that are inactive for 10 weeks
what i do for deletion procedure is the following
1. Querying for computer accounts with less than 10 weeks logon attempts and
exporting it to a txt file
dsquery computer -limit 0 -inactive 10 >C:\TenWeeks.txt
2. copy and paste all the output data in an excel sheet such that the sheets
looks like the following
Dsmove “ Date exported “ -newparent New distination Distinguised name
3. concatenate the 2 columns containing “ with the date exported into a
single column to have the following view
Dsmove “data exported†-newparent New DN for destination
4. Copy all the data and paste it into a Microsoft word document file, it
will be exported as a table
5. Choose the convert to text option and separate the columns with a space
6. Copy all the data and paste it into a txt file , then convert the
extension to a .bat file
7. Run it and enjoy
"Sohail" <Sohail@discussions.microsoft.com> wrote in message
news:CA651C7A-66B9-4B15-9D22-44DF1911E52B@microsoft.com...
>I read somewhere, I forgot, there is command line tool to list all computer
> accounts & also can delete computer accounts not active morethan specified
> days with additional arguments with that command. Any help
You need program "Active Directory Janitor"
On Tue, 15 Jan 2008 10:59:00 -0800, Sohail wrote:
> I read somewhere, I forgot, there is command line tool to list all computer
> accounts & also can delete computer accounts not active morethan specified
> days with additional arguments with that command. Any help
This command will find all computers with a stale password 90 old or older and remove them from active directory.
dsquery computer -uco -stalepwd 90 -limit 0 | dsrm -uci -noprompt
The dsrm command is able to us Unicode input/output. The dsquery command does not state that it can so I decided to try it and it worked great. You need to use the -noprompt so it will remove the computer then move on to the next one without any input.
-uco = unicode formatted output
-uci = unicode formatted input
Rick
Bookmarks