Albert Widjaja
asked on
How to get list of servers with the SCSI controller model ?
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.
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.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
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.
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:
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'
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.
ASKER
Hi @QLemo, I've created this simple script using Powershell Quest AD to narrowed down the search:
is it possible to use that by merging it with your script above ?
$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) {
}
is it possible to use that by merging it with your script above ?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
many thanks !
ASKER