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
498 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
3 Comments
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 167 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now