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
517 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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 …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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 …
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 …

726 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