ServerManager 模块在Windows 7 Ultimate上可用吗?
我认为(但我不确定,因为我以前从未看过输出)我以前工作过的 PS 脚本,但在 IIS7 安装出现一些问题后,它停止工作。
以下脚本
import-module servermanager
Run Code Online (Sandbox Code Playgroud)
因错误而失败
Import-Module : The specified module 'servermanager' was not loaded because no valid module file was found in any module directory.
At line:1 char:14
+ import-module <<<< servermanager
+ CategoryInfo : ResourceUnavailable: (servermanager:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
Run Code Online (Sandbox Code Playgroud)
我找到了运行的建议
Dism.exe /Online /Enable-Feature /FeatureName:ServerManager-PSH-Cmdlets
Run Code Online (Sandbox Code Playgroud)
在我的机器上,但它也因错误而失败 Feature name ServerManager-PSH-Cmdlets is unknown.