I’m trying through WMI to get some software update information from the SCCM namespace. When i create the variable of $run through the below code, the area i’m interested in is “AssignedCIs”. This is displayed in a XML format.
57d58fbe-1fcf-4a8e-80e2-f4879ed802df
Site_47A3BB0F-C21F-4658-926A-67657D06EC0B/SUM_57d58fbe-1fcf-4a8e-80e2-f4879ed802df
1.00
200
57d58fbe-1fcf-4a8e-80e2-f4879ed802df{47A3BB0F-C21F-4658-926A-67657D06EC0B}1384f5f325-30d7-41c4-81d1-87a0e6535
b66
FALSE
Update for Microsoft SharePoint Designer 2010 (KB2553459) 64-Bit Edition
e6cf1350-c01b-414d-a61f-263d14d133b4
I want to pull out the Displayname details to start with. But i can’t seem to get it right.
If i use the XML created variable, $XML.Objects.Object i can’t select the displayname ‘field’. It also puts the Objects.object into a system.string but step up to $XML.Objects and its an XMLElement. Could really do with some guidance please !
Just curious, what is the CIM call to SCCM returning? If it’s a normal object, why not just get the data from it? Why convert it to XML first? I don’t have an SCCM environment so I can’t test.
ConvertTo-Xml isn’t what you’re after; that’s for taking an object and making an XML representation of it, not the other way around. Instead, you’d just be taking a string and casting it to the [xml] type. Here’s an example of what that might look like, from Account Suspended :
Thank you all, i will go back to it this morning.
Thank you Dave, i’ll have a play with what you’ve done. A useful peace of code and usage Dave, will help my learning !