I ran into following problem:
When i´m running a query where there is a join inside, then the systemproperty "__PATH" is empty. When im running it without the Join, everything works fine:
Working:
$apps = Get-WMIObject -Namespace root/SMS/site_$($siteCode) -ComputerName $($siteserver) -Query `
"SELECT * FROM SMS_Application where IsLatest='true' and IsExpired='false' and LocalizedDisplayName like '%hydro%'"
$apps[0].__PATH
Output: "\SCCM\root\SMS\site_CMT:SMS_Application.CI_ID=16781953"
Not working:
$apps = Get-WMIObject -Namespace root/SMS/site_$($siteCode) -ComputerName $($siteserver) -Query `
"SELECT * FROM SMS_Application as App join SMS_ObjectContainerItem as FI on App.ModelName=FI.InstanceKey where App.IsLatest='true' and IsExpired='false' and LocalizedDisplayName like '%hydro%'"
$apps[1].app.__PATH
My Question: Can anyone explain to me why the Path is empty? Thanks a lot, Regards