Change the text file name accordingly.
Function Get-Osinfo
{
BEGIN{}
Process{
$computername =
$_
Get-wmiobject
–class win32_operatingsystem –computer $computername | select-object
BuildNumber, Caption, ServicePackMajorVersion
}
END{}
}
Get-content C:\computers.txt |
get-osinfo
Regards
Baij
No comments:
Post a Comment