Microsoft.Windows.Client.Computer inherits from Microsoft.Windows.Computer. It is possible to make an existing Microsoft.Windows.Computer a Microsoft.Windows.Client.Computer. Basically, this routine adds a new entry to the Type Managed Entity for
the selected object.
You must create a "new object" of the Microsoft.Windows.Client.Computer class but the key property (in this case, PrincipalName) can match the principal name of an existing Microsoft.Windows.Computer.
So, for instance, let's say you have a Microsoft.Windows.Computer class object with a PrincipalName "MyComputer.MyDomain.Net"
You can use the SDK or Powershell to "create" a Microsoft.Windows.Client.Computer class object with the same PrincipalName. This will add the Microsoft.Windows.Client.Computer class properties to that same object (including any extension properties
you may have added to the client computer class).
$mpc = get-scsmclass -name Microsoft.Windows.Client.Computer
new-scsmobject -class $mpc -propertyhashtable @{"PrincipalName" = "MyComputer.MyDomain.Net";}
So..it's not exactly "copying" as such..it's more like "morphing". MyComputer.MyDomain.Net is still a Microsoft.Windows.Computer class object, but now it is also a Microsoft.Windows.Client.Computer class object
edit: in the interest of full disclosure, I only tried this technique this morning and was surprised it worked. SCSM's class system is a little less strict than I thought. There may be a more elegant way of "morphing" an object into a child class
and I'm going to dig into the SDK later to see if any such morphing routines exist..but, for now, the "create new object" trick should work fine for you.
-
Edited by
Aaron Croasmun
Tuesday, January 20, 2015 3:30 PM
-
Marked as answer by
FrankCoast
Thursday, January 22, 2015 2:15 PM