Hi,
I'm wanting to output 2 properties retrieved from a WQL query against an SCCM site. If I run a query against only one WMI class, I'm then able to display the properties from the resulting object in the pipeline... but if I use a join within the query, the object returned to the pipeline has the 2 represented classes within it as properties but I'm not sure how to access the properties within these.
What I'd like to see is .Name from SMS_R_System and .Installdate from SMS_G_System_ADD_REMOVE_PROGRAMS
Example query:
gwmi -query 'select * from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Attachmate EXTRA! X-treme 9"' -Namespace root\sms\site_zfs
Returns:
TypeName: System.Management.ManagementObject#root\sms\site_zfs\__GENERIC
SMS_G_System_ADD_REMOVE_PROGRAMS Property System.Management.ManagementObject#SMS_G_System_ADD_REMOVE_PROGRAMS SMS_G_System_ADD_REMOVE_PROGRAMS {get;set;}
SMS_R_System Property System.Management.ManagementObject#SMS_R_System SMS_R_System {get;set;}