Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Script based on Membership.??

Status
Not open for further replies.

mrclasik

Technical User
Dec 16, 2004
18
0
0
US
Is there a way to run a batch script based on OU memberships. I have setup different OU's for my workstations and servers. I would like to have a vbscript determain the membership and run a specific script according to the membership. Is there a way to do this.. Cutting my teeth in Scripting.. Any help appreciated. thanks..

Clasik
 
Check out my two FAQs here. I think these will help you.

faq329-5908 faq329-5798

I hope you find this post helpful.

Regards,

Mark
 
Here's an example of something that we use to push out files/updates to local PC's.

\\fs-share1\public\ifmember forest\sms_contracts
if errorlevel 1 goto push_contracts
GOTO push_cont_templates0506

:push_contracts
%systemroot%\system32\xcopy.exe "\\FS-SHARE1\SMS-CAP\Contracts App\Updated files\*.*" "c:\program files\contracts\*.*" /D/Y

:push_cont_templates0506
\\fs-share1\public\ifmember forest\sms-k-0506
if errorlevel 1 goto push0506
GOTO push_cont_templates0506oscp

Hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top