Skip to content

Commit b251fd3

Browse files
author
Varun Rao Bhamidimarri
committed
Add alex,tina to datascience group
1 parent e5aaa66 commit b251fd3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

aws_emr_blog_v3/cloudformation/ec2-win-ad.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,12 @@ Resources:
306306
- !Ref 'DefaultADUserPassword'
307307
- "' -Force)\n"
308308
- "Enable-ADAccount -Identity \"alex\"\n"
309+
- "$domain='"
310+
- !Ref 'DomainDNSName'
311+
- "'\n"
312+
- "Get-ADUser -Filter * -SearchBase ('DC={0},DC={1}' -f $domain.split(\".\")[0],$domain.split(\".\")[1]) -Properties userPrincipalName | foreach { Set-ADUser $_ -UserPrincipalName (\"{0}@{1}\" -f $_.name,$domain)}\n"
313+
- "New-ADGroup -Name \"DataScience\" -SamAccountName DataScience -GroupCategory Security -GroupScope Global -DisplayName \"DataScience\" -Path ('CN=Users,DC={0},DC={1}' -f $domain.split(\".\")[0],$domain.split(\".\")[1]) -Description \"Members of this group have access to data science resources and data sets\"\n"
314+
- "Add-ADGroupMember -Identity \"DataScience\" -Members alex,tina \n"
309315
services:
310316
windows:
311317
cfn-hup:

0 commit comments

Comments
 (0)