1
我打電話簡單以下PowerShell的命令的AppFabric:的AppFabric PowerShell的錯誤「‘GET-CacheStatistics’一詞未被識別爲cmdlet的名稱。」
powershell -noexit c:\scripts\ApplyClusterConfig.ps1
和腳本只包含:
Get-CacheStatistics
,我發現了以下錯誤:
The term 'Get-CacheStatistics' is not recognized as the name of a cmdlet, funct
ion, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At C:\scripts\ApplyClusterConfig.ps1:1 char:20
+ Get-CacheStatistics <<<<
+ CategoryInfo : ObjectNotFound: (Get-CacheStatistics:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我做everyting,我可以科幻。第二網絡包括
Set-ExecutionPolicy Unrestricted
和使用上的\來引用文件:
powershell -noexit .\ApplyClusterConfig.ps1
,並設置環境路徑包括C:\ Scripts中
但誤差保持持續。任何人都可以幫忙,因爲我已經用完所有谷歌選項。謝謝。
是啊,這工作,運行的命令如下: powershell.exe -noexit -command 「導入模塊DistributedCacheAdministration;獲取-CacheStatistics」 謝謝 – Asterix