0

运行 Get-WindowsOptionalFeature 命令时收到以下错误消息。

PS C:\Windows\system32> Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol 

Get-WindowsOptionalFeature : An error occured. No operation was performed. 
Verify that DISM is installed properly in the image, and then try the operation again.
At line:1 char:1
+ Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo      : NotSpecified: (:) [Get-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.GetWindowsOptionalFeatureCommand
4

1 回答 1

0

确保您的 DISM 实际使用:

dism /online /Get-FeatureInfo /FeatureName:SMB1Protocol

仔细检查您的 Windows 版本是否正确。有时,如果您安装了其他版本的 WAIK,可能会导致这种情况,例如:

gwmi win32_operatingsystem | fl *
  caption      : Microsoft Windows Server 2012 R2 Standard
  BuildNumber  : 9600
  Version      : 6.3.9600

dism /online /get-feature
  Deployment Image Servicing and Management tool
  Version: 6.3.9600.19408  # Version of dism
  Image Version: 6.3.9600.19397  # Version of windows
于 2021-06-22T18:11:46.373 回答