|
Hmmm….
Let me think….. YES!
;o) Rick From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean Wells I appreciate the compliment Rick ...
nothing interesting this time I'm afraid ... Anybody interested in a script that resets
every DC's DSRM password to the same value? ;-) -- From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rick Kingslan Heh…. I see that Dean has
already answered this, so I’m most interested to see what the
“Wizard of the Shell Script” has come up with…. Rick From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Brian Desmond Maybe this didn’t go through this morning? From: Brian Desmond
[mailto:[EMAIL PROTECTED] Ok, her’s what I need to do from within a .cmd file (this is the
only hook I have into a process that runs on every workstation once an hour
– no I can’t use a _vbscript_ or any of that): Check device’s domain If Domain <> MyDomain Run
netdom and remove Reboot Otherwise Quit Now I figured out a way to use wmic to get the domain, but it returns
multiple lines of text, and I don’t have a clue how I would parse that in
a batch file. The output of “wmic computersystem get domain” looks like
this: Z:\Files\PsTools>wmic computersystem get domain Domain WORKGROUP Z:\Files\PsTools> I just need that “WORKGROUP”. Ideally my script needs to work on NT and newer. I’ll settle for
2000 & newer and the field guys can do the NT ones by hand if need be. The
NT inventory purportedly has WMI installed, which I presume means wmic would
work. I’m all up for a different way of doing this – I don’t
know of an environment variable or similar holding the machine’s domain. Anyone got a way I can make this work? --brian |
- RE: [ActiveDir] FW: Batch Script Fun Rick Kingslan
- RE: [ActiveDir] FW: Batch Script Fun Dean Wells
- RE: [ActiveDir] FW: Batch Script Fun Rick Kingslan
- RE: [ActiveDir] FW: Batch Script Fun Dean Wells
- RE: [ActiveDir] FW: Batch Script Fun Hunter, Laura E.
- RE: [ActiveDir] FW: Batch Script Fun Brian Desmond
- RE: [ActiveDir] FW: Batch Script Fun Robert Williams \(RRE\)
- RE: [ActiveDir] FW: Batch Script Fun Dean Wells
- RE: [ActiveDir] FW: Batch Script Fun Ruston, Neil
- RE: [ActiveDir] FW: Batch Script Fun Dean Wells
