Powershell Set/Get-GPPermission missing from Group Policy on Windows 10

Server Fault Asked by sdjuan on November 30, 2020

Recently updated from windows 7 enterprise to windows 10 enterprise and went to run a script that has a call to Get-GPPermision and it errored out as missing that command. Edit: Set-GPPermission is also missing.

checking for commands inside the group policy cmdlet shows that yes it is missing:

PS C:WINDOWSsystem32> get-command -Module grouppolicy

CommandType     Name                                               Version    Source                                             
-----------     ----                                               -------    ------                                             
Cmdlet          Backup-GPO                                   GroupPolicy                                        
Cmdlet          Copy-GPO                                     GroupPolicy                                        
Cmdlet          Get-GPInheritance                            GroupPolicy                                        
Cmdlet          Get-GPO                                      GroupPolicy                                        
Cmdlet          Get-GPOReport                                GroupPolicy                                        
Cmdlet          Get-GPPrefRegistryValue                      GroupPolicy                                        
Cmdlet          Get-GPRegistryValue                          GroupPolicy                                        
Cmdlet          Get-GPResultantSetOfPolicy                   GroupPolicy                                        
Cmdlet          Get-GPStarterGPO                             GroupPolicy                                        
Cmdlet          Import-GPO                                   GroupPolicy                                        
Cmdlet          New-GPLink                                   GroupPolicy                                        
Cmdlet          New-GPO                                      GroupPolicy                                        
Cmdlet          New-GPStarterGPO                             GroupPolicy                                        
Cmdlet          Remove-GPLink                                GroupPolicy                                        
Cmdlet          Remove-GPO                                   GroupPolicy                                        
Cmdlet          Remove-GPPrefRegistryValue                   GroupPolicy                                        
Cmdlet          Remove-GPRegistryValue                       GroupPolicy                                        
Cmdlet          Rename-GPO                                   GroupPolicy                                        
Cmdlet          Restore-GPO                                  GroupPolicy                                        
Cmdlet          Set-GPInheritance                            GroupPolicy                                        
Cmdlet          Set-GPLink                                   GroupPolicy                                        
Cmdlet          Set-GPPrefRegistryValue                      GroupPolicy                                        
Cmdlet          Set-GPRegistryValue                          GroupPolicy      

Here’s the version table:

PS C:WINDOWSsystem32> $PSVersionTable

Name                           Value                                                                                             
----                           -----                                                                                             
PSVersion                      5.1.14393.693                                                                                     
PSEdition                      Desktop                                                                                           
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                           
BuildVersion                   10.0.14393.693                                                                                    
CLRVersion                     4.0.30319.42000                                                                                   
WSManStackVersion              3.0                                                                                               
PSRemotingProtocolVersion      2.3                                                                                               

The latest (posted last month) I can find shows the command stil there:

Note: it appears that Microsoft has broken backwards compatibility since the calls were named Get-GPPermissions and Set-GPPermissions in group policy with powershell 4, now they droped the ‘s’ and are both named singular Get-GPPermission and Set-GPPermission.

Anyone know how I can re-install the module?

Edit: module re-install was easy it was just a case of uninstalling RSAT and then re-installing that. Sadly the command is still not showing up so my question should now be how to regain the missing commands.

One Answer

After spending too many hours trying to debug this I gave up and re-imaged the system from scratch which fixed the issue. It's not an answer but it makes the question moot.

Answered by sdjuan on November 30, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP