I was hoping someone will direct him to dsquery  :o)

Assuming file containing computernames is Comps.txt

put this in the batch file and keep it in same folder as comps.txt

for /f %%A in (comps.txt) do (
dsquery computer -samid %%A$ | dsget computer -samid -disabled
)

You should get the two column listing computername with YES or NO for disabled.

-
Kamlesh

On 10/21/05, Jitendra Kalyankar <[EMAIL PROTECTED] > wrote:
I know about the Oldcmp.exe, but the thing is the tool is really
powerful and I don't want Jr. Sys. Admins doing something or
deleting something that they are not suppose to. And again
I will have to go through the security department route to use
it. Too much hassel....

Hope that explains my situation.

Sincerely,
Jitendra Kalyankar

On 10/20/05, Creamer, Mark <[EMAIL PROTECTED]> wrote:
> Before you do this, see oldcmp at www.joeware.net
>
> http://www.joeware.net/win/free/index.htm
>
>
>
> <mc>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of
> Jitendra Kalyankar
> Sent: Thursday, October 20, 2005 4:14 PM
> To: [email protected]
> Subject: [ActiveDir] Need ADSI Scripting help.
>
> I am looking for some example script and/or help for the script I am writing for
> my company. What I want to achieve is if I run the script against the machine
> list which will be in the text file, it should give me the output in
> the text file
> saying which machine account is enabled, disabled or not found.
>
> I know how to manipulate the text files using fso object but I am not sure
> what do I need to use to get the attributes of computer container in AD. Any
> help in this regard is highly appreciated and valued.
>
> Please let me know if you need more information abou this.
>
> --
> Thanks,
> Jitendra Kalyankar
> List info   : http://www.activedir.org/List.aspx
> List FAQ    : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
>
> This e-mail transmission contains information that is intended to be confidential and privileged.  If you receive this e-mail and you are not a named addressee you are hereby notified that you are not authorized to read, print, retain, copy or disseminate this communication without the consent of the sender and that doing so is prohibited and may be unlawful.  Please reply to the message immediately by informing the sender that the message was misdirected.  After replying, please delete and otherwise erase it and any attachments from your computer system.  Your assistance in correcting this error is appreciated.
> List info   : http://www.activedir.org/List.aspx
> List FAQ    : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
>


--
Thanks,
Jitendra Kalyankar
List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Fortune and Love befriend the bold"
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to