我正在调用以下简单的 Powershell AppFabric 命令:
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
我已经完成了我可以在网上找到的所有内容,包括
Set-ExecutionPolicy Unrestricted
并使用 .\ 来引用文件:
powershell -noexit .\ApplyClusterConfig.ps1
并将环境路径设置为包含 c:\Scripts
但是错误一直存在。任何人都可以帮忙,因为我已经用完了所有谷歌选项。谢谢。