System info Check All Servers in a Domain


systeminfo /s %computername% | findstr /c:"Model:" /c:"Host Name" /c:"OS Name"


import-module activedirectory
get-adcomputer -filter {operatingsystem -like "windows server*"} | select-object name | export-csv .\computers.txt -notypeinformation -encoding UTF8
(Get-Content .\computers.txt) | % {$_ -replace '"', ""} | out-file -FilePath .\computers.txt -force -encoding ascii
$computers= get-content .\computers.txt | select -Skip 1
Foreach($computer in $computers){systeminfo /s $computer | findstr /c:"Model:" /c:"Host Name" /c:"OS Name" | out-file -FilePath .\VirPhys.txt -append }

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: