我正在尝试使用 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>
Run Code Online (Sandbox Code Playgroud)
如何安装组策略模块?