Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

gwmi win32_product error ONLY in win xp

$
0
0

Hi  All,

I am creating a script to collect some system information for multiple servers. As a part of it, I am collecting softwares installed in group of machines. I am taking the list of softwares installed in a machine with gwmi win32_product command and writing each software name to a column in excel. My script is completed. When i am executing the script from server 2008 machine(or win7) I dont get any errors. But when I run the script from windows xp, SP3 machine, it gives me the following error:

Get-WmiObject : Invalid class 

At C:\Systeminfo.ps1:368 char:14

+ $apps =  gwmi <<<<  win32_product -ComputerName $compu | select name | sort name

    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], Managemen 

   tException

    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.C 

   ommands.GetWmiObjectCommand

Can anyone help me pls?

 

Chaitanya.


Viewing all articles
Browse latest Browse all 6937

Trending Articles