![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How to check service packs on remote computers. Hello, I am wanting to write a script that will take a list of server names and return the OS and service pack level. I have written $ser= get-Content c:\wmi\servers.txt Get-WmiObject win32_osrecoveryconfiguration -computername $ser | Format-Table __server, name This gives a list of the server and the OS but not the Service Pack level. Thanks for any help |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How to check service packs on remote computers. $ser= get-Content c:\wmi\servers.txt foreach($s in $ser) { $ServicePack = Get-WmiObject Win32_OperatingSystem -ComputerName $s $ServicePack = $ServicePack.ServicePackMajorVersion Write-Host "Server [$s] has SP [$ServicePack]" } -- Brandon Shell --------------- Stop by my blog some time ![]() Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject -------------------------------------- "Damon" <Damon@discussions.microsoft.com> wrote in message news:94E0DBA1-DABC-4A67-BC78-2BDC36FAF548@microsoft.com... > Hello, > I am wanting to write a script that will take a list of server names and > return the OS and service pack level. > I have written > $ser= get-Content c:\wmi\servers.txt > Get-WmiObject win32_osrecoveryconfiguration -computername $ser | > Format-Table __server, name > This gives a list of the server and the OS but not the Service Pack level. > > Thanks for any help |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How to check service packs on remote computers. gwmi win32_operatingsystem | select service* "Damon" <Damon@discussions.microsoft.com> wrote in message news:94E0DBA1-DABC-4A67-BC78-2BDC36FAF548@microsoft.com... > Hello, > I am wanting to write a script that will take a list of server names and > return the OS and service pack level. > I have written > $ser= get-Content c:\wmi\servers.txt > Get-WmiObject win32_osrecoveryconfiguration -computername $ser | > Format-Table __server, name > This gives a list of the server and the OS but not the Service Pack level. > > Thanks for any help |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How to check service packs on remote computers. Thanks guys, that worked great! "Brandon Shell" wrote: > $ser= get-Content c:\wmi\servers.txt > > foreach($s in $ser) > { > $ServicePack = Get-WmiObject Win32_OperatingSystem -ComputerName $s > $ServicePack = $ServicePack.ServicePackMajorVersion > Write-Host "Server [$s] has SP [$ServicePack]" > } > > -- > Brandon Shell > --------------- > Stop by my blog some time ![]() > Blog: http://www.bsonposh.com/ > PSH Scripts Project: www.codeplex.com/psobject > -------------------------------------- > > "Damon" <Damon@discussions.microsoft.com> wrote in message > news:94E0DBA1-DABC-4A67-BC78-2BDC36FAF548@microsoft.com... > > Hello, > > I am wanting to write a script that will take a list of server names and > > return the OS and service pack level. > > I have written > > $ser= get-Content c:\wmi\servers.txt > > Get-WmiObject win32_osrecoveryconfiguration -computername $ser | > > Format-Table __server, name > > This gives a list of the server and the OS but not the Service Pack level. > > > > Thanks for any help > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| No service packs available? | Vista General | |||
| Vista Service Packs | Vista installation & setup | |||
| Vista Service Packs? | Windows Updates | |||
| VISTA and XP next service packs? | Vista General | |||
| Service Packs download size | Vista General | |||