added missing server param for adgroupmember
This commit is contained in:
parent
73b9838b5b
commit
3dfa7a0e58
@ -16,13 +16,17 @@ if($PSBoundParameters.ContainsKey("Server")){
|
|||||||
$ret = New-ADGroup -Path $Projects -Server $Server -Name $ProjectName -GroupCategory Security -GroupScope Global
|
$ret = New-ADGroup -Path $Projects -Server $Server -Name $ProjectName -GroupCategory Security -GroupScope Global
|
||||||
$acl = . .\AddProjectACL.ps1 -ProjectName $ProjectName -Server $Server
|
$acl = . .\AddProjectACL.ps1 -ProjectName $ProjectName -Server $Server
|
||||||
$r = . .\AddProjectRoles.ps1 -ProjectName $ProjectName -Server $Server
|
$r = . .\AddProjectRoles.ps1 -ProjectName $ProjectName -Server $Server
|
||||||
$ret | Add-ADGroupMember -Members $acl,$r
|
#$ret | Add-ADGroupMember -Members $acl,$r
|
||||||
|
$acl | ForEach-Object {New-ADGroupMember -Identity $ret -Member $_ -Server $Server}
|
||||||
|
$r | ForEach-Object {New-ADGroupMember -Identity $ret -Member $_ -Server $Server}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$ret = New-ADGroup -Path $Projects -Name $ProjectName -GroupCategory Security -GroupScope Global
|
$ret = New-ADGroup -Path $Projects -Name $ProjectName -GroupCategory Security -GroupScope Global
|
||||||
$acl = . .\AddProjectACL.ps1 -ProjectName $ProjectName
|
$acl = . .\AddProjectACL.ps1 -ProjectName $ProjectName
|
||||||
$r = . .\AddProjectRoles.ps1 -ProjectName $ProjectName
|
$r = . .\AddProjectRoles.ps1 -ProjectName $ProjectName
|
||||||
$ret | Add-ADGroupMember -Members $acl,$r
|
#$ret | Add-ADGroupMember -Members $acl,$r
|
||||||
|
$acl | ForEach-Object {New-ADGroupMember -Identity $ret -Member $_}
|
||||||
|
$r | ForEach-Object {New-ADGroupMember -Identity $ret -Member $_}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret
|
return $ret
|
||||||
|
Loading…
Reference in New Issue
Block a user