【问题标题】:Cannot import modules in Powershell无法在 Powershell 中导入模块
【发布时间】:2016-04-21 17:36:45
【问题描述】:

由于此错误,我无法在 Powershell 中导入任何模块:

PS C:\Users\Administrator> import-module failoverclusters
The term 'import-module' is not recognized as a cmdlet, function, operable program, or     script file. Verify the term and
 try again.
At line:1 char:14
+ import-module  <<<< failoverclusters

这是全新安装的 Windows Server 2008 Enterprise。我通过服务器管理器将 Powershell 安装为 Windows 功能。安装 Windows Server 时尚未安装。

【问题讨论】:

    标签: powershell


    【解决方案1】:

    这是因为 Windows 2008 仅附带使用 Snapins 的 PowerShell 1.0。如果您需要模块支持:安装 PowerShell 2.0 或 3.0。安装人员的链接:

    Powershell 2.0:x64 (64-bit)x86 (32-bit)

    PowerShell 3.0

    要安装 PS 3.0,您至少需要 2008 SP2(并下载 windows 6.0 64 位或 32 位版本)。

    【讨论】:

      【解决方案2】:

      尝试右键单击 PowerShell 图标并选择“导入系统模块”选项。然后运行命令Set-ExecutionPolicy RemoteSigned

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-12-21
        • 2020-12-26
        • 1970-01-01
        • 1970-01-01
        • 2013-06-08
        相关资源
        最近更新 更多