Solved

Powershell / Quest commandLets script that will give output of all servers and pc's in a domain by OS

Posted on 2011-09-30
3
513 Views
Last Modified: 2012-08-14
Powershell / Quest commandLets script that will give output of all servers and pc's in a domain filtered by OS and export to CSV file.  IE: os=NT, XP, Windows 7, 2000, 2003, 2008
0
Comment
Question by:mjm21
[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
3 Comments
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 167 total points
ID: 36893165
Try this.

get-qadcomputer * | select-object name,operatingsystem | sort-object operatingsystem | export-csv c:\file.txt
0
 
LVL 3

Assisted Solution

by:LindyS
LindyS earned 167 total points
ID: 36893194
Get-QADComputer -searchroot 'domain.name' | Select Name,OSName, OSVersion,ParentContainer | Export-CSV C:\temp\Computers.csv -notype -unicode

There are other fields you can export, but this is a basic starting point.

You will need the Quest Active Roles addin for this to work correctly though.
0
 
LVL 39

Assisted Solution

by:Krzysztof Pytko
Krzysztof Pytko earned 166 total points
ID: 36893807
Out of points please

Guys provided you a solution. Just import the output into Excel and use auto filter to filter OS out.

But you may wish to use other syntax to export only computers with particular OS type. Using PowerShell you can use a switch -LDAPFilter

Get-QADComputer -LDAPFilter "&(&(objectClass=Computer)(objectCategory=Computer)(operatingSystem="Windows XP Professional"))" | Select name | Export-CSV c:\WinXP.csv

And change operatingSystem value to another:
Windows Server 2008*
Windows 7*

Or use simply DS Tools

Dsquery * -filter "&(&(objectClass=Computer)(objectCategory=Computer)(operatingSystem="Windows Server 2008*"))" -attr name >>c:\2008.txt

Regards,
Krzysztof
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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