Windows Vista Forums

Error in Primer? Get-WmiObject fails
  1. #1


    Jon Davis Guest

    Error in Primer? Get-WmiObject fails

    Under Working with Software Installations, p 90, instructed to use

    Get-WmiObject -Class Win32_Product -ComputerName .

    ... which results in ..

    PS C:\> Get-WmiObject -Class Win32_Product -ComputerName .
    Get-WmiObject : Invalid class
    At line:1 char:14
    + Get-WmiObject <<<< -Class Win32_Product -ComputerName .
    PS C:\>



      My System SpecsSystem Spec

  2. #2


    Krishna Vutukuri[MSFT] Guest

    Re: Error in Primer? Get-WmiObject fails

    Hi Jon,

    Thanks for reporting this. Can you open a bug on connect?

    --
    Thanks
    Krishna[MSFT]
    Windows PowerShell Team
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Jon Davis" <jon@REMOVE.ME.PLEASE.jondavis.net> wrote in message news:uyc9XlPFHHA.420@TK2MSFTNGP06.phx.gbl...
    Under Working with Software Installations, p 90, instructed to use

    Get-WmiObject -Class Win32_Product -ComputerName .

    .. which results in ..

    PS C:\> Get-WmiObject -Class Win32_Product -ComputerName .
    Get-WmiObject : Invalid class
    At line:1 char:14
    + Get-WmiObject <<<< -Class Win32_Product -ComputerName .
    PS C:\>

      My System SpecsSystem Spec

  3. #3


    Jon Davis Guest

    Re: Error in Primer? Get-WmiObject fails

    Is it a bug in Get-WmiObject or in the documentation?

    Jon

    "Krishna Vutukuri[MSFT]" <kriscv@online.microsoft.com> wrote in message news:uWOVFOQFHHA.2464@TK2MSFTNGP06.phx.gbl...
    Hi Jon,

    Thanks for reporting this. Can you open a bug on connect?

    --
    Thanks
    Krishna[MSFT]
    Windows PowerShell Team
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Jon Davis" <jon@REMOVE.ME.PLEASE.jondavis.net> wrote in message news:uyc9XlPFHHA.420@TK2MSFTNGP06.phx.gbl...
    Under Working with Software Installations, p 90, instructed to use

    Get-WmiObject -Class Win32_Product -ComputerName .

    .. which results in ..

    PS C:\> Get-WmiObject -Class Win32_Product -ComputerName .
    Get-WmiObject : Invalid class
    At line:1 char:14
    + Get-WmiObject <<<< -Class Win32_Product -ComputerName .
    PS C:\>

      My System SpecsSystem Spec

  4. #4


    dreeschkind Guest

    RE: Error in Primer? Get-WmiObject fails

    Do you get this error message only on one system or do you get this on other
    systems too? I tested it on my installation (XP SP2) and it seems to work
    just fine.

    --
    greetings
    dreeschkind

    "Jon Davis" wrote:

    > Under Working with Software Installations, p 90, instructed to use
    >
    > Get-WmiObject -Class Win32_Product -ComputerName .
    >
    > ... which results in ..
    >
    > PS C:\> Get-WmiObject -Class Win32_Product -ComputerName .
    > Get-WmiObject : Invalid class
    > At line:1 char:14
    > + Get-WmiObject <<<< -Class Win32_Product -ComputerName


      My System SpecsSystem Spec

  5. #5


    Andrew Watt [MVP] Guest

    Re: Error in Primer? Get-WmiObject fails

    For me it works on XP SP2 but gives the error message reported earlier
    on Windows 2003 SP1.

    Andrew Watt MVP

    On Fri, 1 Dec 2006 07:10:00 -0800, dreeschkind
    <dreeschkind@discussions.microsoft.com> wrote:

    >Do you get this error message only on one system or do you get this on other
    >systems too? I tested it on my installation (XP SP2) and it seems to work
    >just fine.
    >
    >--
    >greetings
    >dreeschkind
    >
    >"Jon Davis" wrote:
    >
    >> Under Working with Software Installations, p 90, instructed to use
    >>
    >> Get-WmiObject -Class Win32_Product -ComputerName .
    >>
    >> ... which results in ..
    >>
    >> PS C:\> Get-WmiObject -Class Win32_Product -ComputerName .
    >> Get-WmiObject : Invalid class
    >> At line:1 char:14
    >> + Get-WmiObject <<<< -Class Win32_Product -ComputerName


      My System SpecsSystem Spec

  6. #6


    Marcel J. Ortiz [MSFT] Guest

    Re: Error in Primer? Get-WmiObject fails

    The Win32_Product WMI class is not installed by default on W2K3. Its an
    optional component.

    To install it go to Add/Remove Programs -> Add/Remove Windows Components ->
    Management and Monitoring Tools
    Checkmark WMI Windows Installer Provider and click on OK.

    The primer should specify that this isn't available by default on W2K3.

    - Marcel


    "Andrew Watt [MVP]" <SVGDeveloper@aol.com> wrote in message
    news:3bt0n2tmtmt99uphhpov1lq7epn0e07nmp@4ax.com...
    > For me it works on XP SP2 but gives the error message reported earlier
    > on Windows 2003 SP1.
    >
    > Andrew Watt MVP
    >
    > On Fri, 1 Dec 2006 07:10:00 -0800, dreeschkind
    > <dreeschkind@discussions.microsoft.com> wrote:
    >
    >>Do you get this error message only on one system or do you get this on
    >>other
    >>systems too? I tested it on my installation (XP SP2) and it seems to work
    >>just fine.
    >>
    >>--
    >>greetings
    >>dreeschkind
    >>
    >>"Jon Davis" wrote:
    >>
    >>> Under Working with Software Installations, p 90, instructed to use
    >>>
    >>> Get-WmiObject -Class Win32_Product -ComputerName .
    >>>
    >>> ... which results in ..
    >>>
    >>> PS C:\> Get-WmiObject -Class Win32_Product -ComputerName .
    >>> Get-WmiObject : Invalid class
    >>> At line:1 char:14
    >>> + Get-WmiObject <<<< -Class Win32_Product -ComputerName




      My System SpecsSystem Spec

  7. #7


    Andrew Watt [MVP] Guest

    Re: Error in Primer? Get-WmiObject fails

    Thanks, Marcel.

    That would explain the observed difference in behaviour on the two
    operating systems.

    Andrew Watt MVP

    On Fri, 1 Dec 2006 10:39:12 -0800, "Marcel J. Ortiz [MSFT]"
    <mosoto@online.microsoft.com> wrote:

    >The Win32_Product WMI class is not installed by default on W2K3. Its an
    >optional component.
    >
    >To install it go to Add/Remove Programs -> Add/Remove Windows Components ->
    >Management and Monitoring Tools
    >Checkmark WMI Windows Installer Provider and click on OK.
    >
    >The primer should specify that this isn't available by default on W2K3.
    >
    >- Marcel


      My System SpecsSystem Spec

  8. #8


    Krishna Vutukuri[MSFT] Guest

    Re: Error in Primer? Get-WmiObject fails

    Hi Jon,

    I dont think this is a bug in Get-WMIObject. On an XP SP2 it works as
    expected. On a Windows Server 2003 SP1 box looks like WMI windows installer
    provider is not installed by default. So please open a documentation bug to
    capture this.

    Further investigation revealed that WMI Windows Installer Provider is an
    optional component on Windows Server 2003. To install this provider, open
    the Control Panel Add/Remove Programs -> and click Add/Remove Windows
    Components. Select Management and Monitoring Tools check box then click
    Details. Select the WMI Windows Installer Provider check box and click OK.

    I got the following output on XP SP2:


    PS C:\Documents and Settings\kriscv> Get-WmiObject -Class
    Win32_Product -ComputerName .


    IdentifyingNumber : {121634B0-2F4A-11D3-ADA3-00C04F52DD53}
    Name : Windows Installer Clean Up
    Vendor : Microsoft Corporation
    Version : 2.05.00.0000
    Caption : Windows Installer Clean Up

    IdentifyingNumber : {C229F511-623E-4B3D-A3D6-1A191337737F}
    Name : Outlook Conference Room Finder
    Vendor : Microsoft
    Version : 2.7.1
    Caption : Outlook Conference Room Finder

    IdentifyingNumber : {133E57E2-C6FD-4FE4-8340-D6954A5909F2}
    Name : .NET Framework Enterprise Code Access Security Policy
    Vendor : Microsoft Corporation
    Version : 1.0.2411.0
    Caption : .NET Framework Enterprise Code Access Security Policy

    --

    Krishna[MSFT]
    Windows PowerShell Team
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Jon Davis" <jon@REMOVE.ME.PLEASE.jondavis.net> wrote in message
    news:OrNVjgSFHHA.3976@TK2MSFTNGP05.phx.gbl...
    Is it a bug in Get-WmiObject or in the documentation?

    Jon

    "Krishna Vutukuri[MSFT]" <kriscv@online.microsoft.com> wrote in message
    news:uWOVFOQFHHA.2464@TK2MSFTNGP06.phx.gbl...
    Hi Jon,

    Thanks for reporting this. Can you open a bug on connect?

    --
    Thanks
    Krishna[MSFT]
    Windows PowerShell Team
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Jon Davis" <jon@REMOVE.ME.PLEASE.jondavis.net> wrote in message
    news:uyc9XlPFHHA.420@TK2MSFTNGP06.phx.gbl...
    Under Working with Software Installations, p 90, instructed to use

    Get-WmiObject -Class Win32_Product -ComputerName .

    ... which results in ..

    PS C:\> Get-WmiObject -Class Win32_Product -ComputerName .
    Get-WmiObject : Invalid class
    At line:1 char:14
    + Get-WmiObject <<<< -Class Win32_Product -ComputerName .
    PS C:\>



      My System SpecsSystem Spec

  9. #9


    Jon Davis Guest

    Re: Error in Primer? Get-WmiObject fails

    > So please open a documentation bug to capture this.

    I don't know how or where. Here?
    https://connect.microsoft.com/site/s...aspx?SiteID=99

    Jon



      My System SpecsSystem Spec

  10. #10


    Adam Milazzo Guest

    Re: Error in Primer? Get-WmiObject fails

    Jon Davis wrote:
    >> So please open a documentation bug to capture this.

    >
    > I don't know how or where. Here?
    > https://connect.microsoft.com/site/s...aspx?SiteID=99
    >
    > Jon


    Yes, that's right.

      My System SpecsSystem Spec

Page 1 of 2 12 LastLast
Error in Primer? Get-WmiObject fails problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
generic error with Get-WmiObject Jeff PowerShell 2 11 Sep 2009
Get-WmiObject Timeout error? Paul Butler PowerShell 0 11 Feb 2009
Get-WmiObject -Filter by non-key property fails Chris Doherty PowerShell 1 09 Dec 2008
supress error messages for get-wmiobject Frank PowerShell 1 04 Apr 2007
Cannot suppress error message in get-wmiobject Frank PowerShell 7 09 Mar 2007