exchange12rocks / PSGPPreferences

A way to manage Group Policy Preferences through PowerShell
MIT License
35 stars 2 forks source link

Can't retrieve values of DeleteAllUsers or DeleteAllGroups once set on a group #30

Closed Borgquite closed 2 years ago

Borgquite commented 2 years ago

Hey,

A few more small ones which are really helpful for my current use case:

I can't find a way to retrieve the value of DeleteAllUsers or DeleteAllGroups from Get-GPPGroup - please could this be added?

PS C:\Windows\system32> New-GPPGroup -GPOName "TEST GPO" -Update -Name "Administrators" -DeleteAllUsers -DeleteAllGroups

PS C:\Windows\system32> Get-GPPGroup -GPOName "TEST GPO" -Name "Administrators"

Properties   : GPPItemPropertiesGroup
name         : Administrators
changed      : 04/04/2022 11:25:45
uid          : <redacted>
removePolicy : False
bypassErrors : True
disabled     : False
Filters      : 
exchange12rocks commented 2 years ago

That's because those are set at the Properties property of a group item object: (Get-GPPGroup -GPOName "TEST GPO" -Name "Administrators").Properties

Borgquite commented 2 years ago

Ah :) Thanks!