Last active
September 11, 2017 15:16
-
-
Save mczerniawski/393d9207671290be7e49b1252d902e2f to your computer and use it in GitHub Desktop.
Create AD groups for LAPS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Share_GPOInstalls_RGroupProps = @{ | |
Name = 'GPOInstalls_R' | |
SamAccountName = 'GPOInstalls_R' | |
Description = 'Members allowed to read from Share GPOInstalls' | |
DisplayName = 'GPOInstalls_R' | |
GroupCategory = 'Security' | |
GroupScope= 'Universal' | |
Path = 'OU=AD,OU=Security Groups,DC=contoso,DC=com' | |
} | |
New-ADGroup @Share_GPOInstalls_RGroupProps | |
$Share_GPOInstalls_RWGroupProps = @{ | |
Name = 'GPOInstalls_RW' | |
SamAccountName = 'GPOInstalls_RW' | |
Description = 'Members with full access to Share GPOInstalls' | |
DisplayName = 'GPOInstalls_RW' | |
GroupCategory = 'Security' | |
GroupScope= 'Universal' | |
Path = 'OU=AD,OU=Security Groups,DC=contoso,DC=com' | |
} | |
New-ADGroup @Share_GPOInstalls_RWGroupProps | |
Add-ADGroupMember -Identity $Share_GPOInstalls_RGroupProps.SamAccountName -Members 'Domain users' | |
Add-ADGroupMember -Identity $Share_GPOInstalls_RWGroupProps.SamAccountName -Members 'Domain admins' | |
$ServerGroupProps = @{ | |
Name = 'LAPSServer_Read' | |
SamAccountName = 'LAPSServers_Read' | |
Description = 'Members allowed to read LAPS attributes for Servers' | |
DisplayName = 'LAPSServers_Read' | |
GroupCategory = 'Security' | |
GroupScope= 'Universal' | |
Path = 'OU=AD,OU=Security Groups,DC=contoso,DC=com' | |
} | |
New-ADGroup @ServerGroupProps | |
$WorkstationGroupProps = @{ | |
Name = 'LAPSWorkstation_Read' | |
SamAccountName = 'LAPSWorkstation_Read' | |
Description = 'Members allowed to read LAPS attributes for Workstations' | |
DisplayName = 'LAPSWorkstation_Read' | |
GroupCategory = 'Security' | |
GroupScope= 'Universal' | |
Path = 'OU=AD,OU=Security Groups,DC=contoso,DC=com' | |
} | |
New-ADGroup @WorkstationGroupProps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment