0
(PS版1)PowerShell的WMI ROOT MicrosoftExchangev2,和WQL其中使用
PS C:\> $query = 'Select * From Exchange_PublicFolder WHERE Path LIKE "/Foo%"'
PS C:\> $query
Select * From Exchange_PublicFolder WHERE Path LIKE "/Foo%"
PS C:\> gwmi -namespace ROOT\MicrosoftExchangev2 -query $query
Get-WmiObject : Provider is not capable of the attempted operation
At line:1 char:5
+ gwmi <<<< -namespace ROOT\MicrosoftExchangev2 -query $query
這沒有什麼區別,如果我嘗試指定查詢變量第一與否。 WQL關鍵字WHERE可能有問題嗎?我可以沒有它運行查詢就好了:
PS C:\> (gwmi -namespace ROOT\MicrosoftExchangev2 -query "Select * From Exchange_PublicFolder").count
711
它不會是一個巨大的交易在管道後過濾,但我試圖找出我在做什麼錯在這裏:)
Google暗示這實際上是從神祕的WMI系統冒出來的東西,但我沒有找到很多細節。 – slipsec 2009-02-24 05:40:46