- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The GetEndpointReference function in WSManClient.cs (C#) will not work for CIM objects of certain types. For example, I'm trying to get/set the active system defense policy. I can use Enumerate(typeof(AMT_NetworkPortSystemDefensePolicy)), which will return up to 2 CIM objects (one for wired and one for wireless). However, if I try using GetEndpointReference on one of these objects, I get this error: "Unable to cast object of type 'MOF_CLASSES.EndpointReferenceType' to type 'System.String'." This is a problem since I can't update/delete a specific instance withoutits EPR. So if I wanted to change the active policy on the wired interface, I wouldn't be able to do so.
AMT_NetworkPortSystemDefensePolicy has Antecedent and Dependent as its fields (both of type EndpointReference). Since the fieldcontanis an object andnot a value that canbe converted to a string, GetEndpointReference fails. Is there a solution to this problem? Or is there another way to do what I'm trying to do?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The GetEndpointReference function in WSManClient.cs (C#) will not work for CIM objects of certain types. For example, I'm trying to get/set the active system defense policy. I can use Enumerate(typeof(AMT_NetworkPortSystemDefensePolicy)), which will return up to 2 CIM objects (one for wired and one for wireless). However, if I try using GetEndpointReference on one of these objects, I get this error: "Unable to cast object of type 'MOF_CLASSES.EndpointReferenceType' to type 'System.String'." This is a problem since I can't update/delete a specific instance withoutits EPR. So if I wanted to change the active policy on the wired interface, I wouldn't be able to do so.
AMT_NetworkPortSystemDefensePolicy has Antecedent and Dependent as its fields (both of type EndpointReference). Since the fieldcontanis an object andnot a value that canbe converted to a string, GetEndpointReference fails. Is there a solution to this problem? Or is there another way to do what I'm trying to do?
Hello Stephen,
This looks potentially like a bug in the SDK in handling nested ERPs. We are contacting our development team to investigate further.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page