How to create new object for Microsoft.Windows.Kits.Hardware.ObjectModel.Machine Class RRS feed

  • Question



    I'm trying to create a new object for Microsoft.Windows.Kits.Hardware.ObjectModel.Machine

    the syntax I'm writing in powershell is

    $MachineNameObject = Microsoft.Windows.Kits.Hardware.ObjectModel.Machine

    When running this code I'm getting the following errors

    New-Object : Constructor not found. Cannot find an appropriate constructor for type
    At C:\Users\Administrator\Documents\MoveMachineTo.ps1:45 char:30
    + $MachineNameObject = New-Object -typename Microsoft.Windows.Kits.Hardwa ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : CannotFindAppropriateCtor,Microsoft.PowerShell.Commands.NewObjectCommand

    Tuesday, September 17, 2013 7:06 AM

All replies

  • What are you trying to do? You can't create a machine object. A machine instance is obtained through other object (i.e. MachinePool::GetMachines()).

    John -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, September 17, 2013 4:26 PM