











CompTIA
Exam Vouchers
Save money on CompTIA exams
| Question of the day
Sign up to receive
interactive practice questions
for MCSE, CompTIA
Cisco and other exams
| TestKing
Get MCSE, MCSD, CCNA, CCNP,A+, N+ and many more | * ExamSheets *
Guide for Success!
Actual Questions & Answers
MCSE, MCSD, A+ ,CCNA, CCNP
Oracle 8i, Oracle 9i Online practice tests
Certification sites Online university Online college Online education Distance learning Software forum Server administration forum Programming resources
|
|  |
| Author |
How To Remove Top Level OU with VBScript
|
TJ
Guest
Registered: Not Yet Location: Country: State: Certifications: Working on:
Total Posts: N/A
|
|
How To Remove Top Level OU with VBScript
OS = W2K Advanced Server
Purpose = Instructor's Active Directory Setup
Subject = Checking for and Removing Like Name OU
Scenario: I am using the following VBScript to create a
top level Organizational Unit. At this time the VBScript
works really well to create an OU as long as there is no
existing OU by the same name.
Question: How do I add (and where within the script) to
this existing script the ability to check for an existing
OU and remove it if it exist so I can continue with the
script without error?
Set Root = GetObject("LDAP://rootDSE")
Set Domain = GetObject("LDAP://" & Root.Get
("defaultNamingContext"))
Set OU=Domain.Create("organizationalUnit","OU=Demo")
OU.Put "Description", "Demonstration OU"
OU.SetInfo
An up front Thank You for your time and reply...TJ
Report this post to a moderator
|
|
03-23-03 10:23 PM
|
|
|
Featured site: MCSE, MCSD, CompTIA, CCNA training videos
Forum Rules: Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is OFF. |
|
ExamNotes forum archive
|