?
Solved

domainroot, forestroot and specifying a domain

Posted on 2010-11-17
4
Medium Priority
?
666 Views
Last Modified: 2012-05-10
Hi guys hope you can help.
We have several subdomains, and when I run the following:

dsquery * domainroot -filter "(&(objectCategory=Computer))" -attr Name operatingSystem operatingSystemServicePack -limit 0

It targets the current domain I am in.

What Id like to do is to change the domain focus to point to another subdomain and perform the same query against that subdomain.

Any help greatly appreciated.
0
Comment
Question by:Simon336697
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 65

Accepted Solution

by:
RobSampson earned 2000 total points
ID: 34160436
Hi, I don't have any subdomains, but can you use:
dsquery * "DC=subdomain,DC=domain,DC=com" -filter "(&(objectCategory=Computer))" -attr Name operatingSystem operatingSystemServicePack -limit 0

Regards,

Rob.
0
 
LVL 1

Author Comment

by:Simon336697
ID: 34199996
Thanks Rob that is awesome
0
 
LVL 1

Author Comment

by:Simon336697
ID: 34200004
Rob can I ask you, are you porting a lot of your scripts over to Powershell, and using Powershell instead of vbs now?
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 34201039
Hi.  I'd like to be, but no, I don't know PowerShell and don't have the time to learn it at the moment.  The time spend in writing a PowerShell script would take me about five times as long as writing a VBS at the moment, despite the fact it would be MUCH less code.

One day I hope to find some time to learn PowerShell, but for now, still going with VBS.

Rob.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question