$com = Get-Content
C:\FileNAme.txt
foreach($computers in
$com){
$cpu = Get-WmiObject -Class
Win32_Processor -Computername $computers
$mb = Get-WmiObject -Class
Win32_BaseBoard -Computername $computers
$sn = Get-WmiObject -Class
win32_bios -Computername $computers
$cn = Get-WmiObject -Class
Win32_ComputerSystem -Computername $computers
$os = Get-WmiObject -Class
Win32_OperatingSystem -Computername $computers
$Office = Get-WmiObject -Class
Win32_Product -Computername $computers | where {$_.Name -eq "Microsoft Office
Standard 2007"}
$props = @{
Computername =
$cn.__Server
SerialNo =
$sn.Serialnumber
Model =
$cn.Model
TotalPhysicalMemory =
$cn.TotalPhysicalMemory / 1024 / 1024
Os =
$os.Caption
IE =
$IE.Version
Office =
$office.Name
}
New-Object PSObject -Property
$props | Ft -Autosize}
Regards,
Baij
No comments:
Post a Comment