Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

DS7 and WinPE: Query AD

Created: 28 Nov 2012 | 3 comments

I need to be able to Query AD and Delete a computer object while in automation. Is this possible?

Comments 3 CommentsJump to latest comment

michael.george's picture

Not something I've ever tried, but I can't think of a good reason why you should be able to run a vbscript to do this. I'm guessing some googling will provide a script you can use as a starting point. You'd need to get the AD record name, which should be possible by asking the DS, SMP, or environment variables I'd imagine.

If a post solves your issue, please mark it as a solution. It makes these forums better for everyone.

donald_noah's picture

Short answer....Yes, it is possible.

 

Long answer...You need to mount the wim, add the ADSI plugin, seal it back up and then create an LDAP query most likely inside a vbscript that you will run in WinPE (Im assuming that is what you mean when you say 'Automation'). I do not have step-by-step instructions, but I would recommend what michael.george said and google "query ad from winpe 2.1".

 

PS...you may or may not get support on this via Symantec Support as this is not built into the product by default. Just a warning.

Donald Noah, Systems Engineer
Intuitive Technology Group -- Symantec Platinum Partner

ixbe's picture

Instead of running a VBScript you might consider the standard utilities:

nltest    To get the nearest domain controller

DSQuery  To locate the computer name in AD

DSRM  To remove the computer object in AD

Netdom To join the computer in AD