我遇到了以下问题:
当我在运行查询时,里面有一个连接,那么系统属性“__PATH”为空。当我在没有加入的情况下运行它时,一切正常:
$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
输出:“\ SCCM \ root \ SMS \ site_CMT:SMS_Application.CI_ID = 16781953”
$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
我的问题: 任何人都可以向我解释为什么路径是空的? 非常感谢,问候