Windows

為什麼即使安裝了 RSAT 也找不到 GroupPolicy 模組?

  • July 7, 2022

我正在嘗試使用 Get-GPO PowerShell 模組。所以我先安裝了 RSAT,但是 GroupPolicy 模組仍然缺失:

PS C:\Users\admin\Desktop> Install-WindowsFeature RSAT

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    No             NoChangeNeeded {}


PS C:\Users\admin\Desktop> Import-Module grouppolicy
Import-Module : The specified module 'grouppolicy' was not loaded because no valid module file was found in any module
directory.
At line:1 char:1
+ Import-Module grouppolicy
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : ResourceUnavailable: (grouppolicy:String) [Import-Module], FileNotFoundException
   + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

PS C:\Users\admin\Desktop>

如何安裝 GroupPolicy 模組?

你很親密。組策略工具過去是作為 RSAT 的子集安裝的,我相信一些文件仍然說明了這一點。

只需執行Install-WindowsFeature GPMC,您將安裝組策略管理控制台和組策略 PowerShell 模組。

引用自:https://serverfault.com/questions/1104985