How to get list of servers with the SCSI controller model ?

Senior IT System Engineer
Senior IT System Engineer used Ask the Experts™
on
Hi All,

using powershell in Active Directory, can anyone here please share the Powershell script to list all server name and its SCSI card name ?

I wonder if that is possible.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
DavidPresident
Top Expert 2010
Commented:
Here is a MSFT blog site that lists several MSFT-written tools that can enumerate device manager remotely.

http://blogs.technet.com/b/wincat/archive/2012/09/06/device-management-powershell-cmdlets-sample-an-introduction.aspx

Author

Commented:
Ok, so I f I have several hundreds servers in an OU can it shows or export it to csv ?
DavidPresident
Top Expert 2010

Commented:
The script won't care how many systems you have, but it will care that you have a supported client operating system.  You would have to modify the script to create output in csv format.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
The script will not care for remote systems at all, and it is overkill for a "simple" task like this.
The difficulty is
  a) to get all AD computers without having the ActiveDirectory cmdlet available (it is W2008 (?))
  b) to run the query on remote machines,
  c) to filter for interesting data,
  d) creating something usable as report.

Mixing different techniques makes it work:
dsquery computer |
  % {
    $pc = $_.Split('=,')[1]
    Write-Host -f yellow $pc
    Get-WmiObject Win32_SCSIController -computer $pc } | select SystemName, Name, Manufacturer, Status
   } | export-CSV -NoType 'C:\Temp\EE\SCSI Report.csv'

Open in new window

There is no way to check for servers only. But if you follow a naming convention making servers stick out of the AD computer names, the dsquery results can be filtered for that.

Author

Commented:
Hi @QLemo, I've created this simple script using Powershell Quest AD to narrowed down the search:

$ErrorActionPreference = "SilentlyContinue"

$server = Get-QADComputer -SearchRoot 'domain.com/Production Servers' -OSName "Windows*Server*" | Where-Object { Test-Connection $_.Name -Count 1 -Quiet }

foreach($computer in $server) {
	
}

Open in new window


is it possible to use that by merging it with your script above ?
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
$ErrorActionPreference = "SilentlyContinue"

Get-QADComputer -SearchRoot 'domain.com/Production Servers' -OSName "Windows*Server*" |
  ? { Test-Connection $_.Name -Count 1 -Quiet } |
  % {
    $pc = $_.Name
    Write-Host -f yellow $pc
    Get-WmiObject Win32_SCSIController -computer $pc } | select SystemName, Name, Manufacturer, Status
   } | export-CSV -NoType 'C:\Temp\EE\SCSI Report.csv'  

Open in new window

Author

Commented:
many thanks !

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial