gpt4 book ai didi

powershell - Powershell 5中的命令Get-WindowsFeature?

转载 作者:行者123 更新时间:2023-12-02 22:39:35 25 4
gpt4 key购买 nike

当我输入命令 Get-WindowsFeature在 PowerShell 5 中显示此错误,我不知道为什么!

Get-WindowsFeature: The term "Get-WindowsFeature" is not recognized as a cmdlet name,
function, script file or executable program. Check the spelling of the name, or if a path
access exists, verify that the path is correct and try again.
To the character Line: 1: 1
+ Get-WindowsFeature
+ ~~~~~~~~~~~~~~~~~~
     + CategoryInfo: ObjectNotFound: (Get-WindowsFeature: String) [], CommandNotFoundException
     + FullyQualifiedErrorId: CommandNotFoundException

enter image description here

最佳答案

Get-WindowsFeature不是 PowerShell 5 的一部分,而是 Server Manager 的一部分未安装或未加载的模块,因为错误消息清楚地指出,您尝试执行的命令不可用。

使用Import-Module ServerManager导入它,或 Import-Module -ListAvailable看看它是否已经安装。

关于powershell - Powershell 5中的命令Get-WindowsFeature?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48769056/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com