Compare commits
2 Commits
2bd7340a85
...
81898676ed
Author | SHA1 | Date | |
---|---|---|---|
|
81898676ed | ||
|
f701fb282f |
@ -11,8 +11,8 @@ param (
|
|||||||
$Type = "RO"
|
$Type = "RO"
|
||||||
)
|
)
|
||||||
|
|
||||||
[ADUser]$User = $null
|
$User = $null
|
||||||
[ADGroup]$Group = $null
|
$Group = $null
|
||||||
|
|
||||||
|
|
||||||
if(!$PSBoundParameters.ContainsKey("ProjectName")){
|
if(!$PSBoundParameters.ContainsKey("ProjectName")){
|
||||||
@ -61,7 +61,7 @@ if($null -eq $Group){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($PSBoundParameters.ContainsKey("Server")){
|
if($PSBoundParameters.ContainsKey("Server")){
|
||||||
Add-ADGroupMember -Identity $targeGroup -Members $User -Server $Server
|
Add-ADGroupMember -Identity $targeGroup -Members $Identity -Server $Server
|
||||||
} else {
|
} else {
|
||||||
Add-ADGroupMember -Identity $targeGroup -Members $User
|
Add-ADGroupMember -Identity $targeGroup -Members $Identity
|
||||||
}
|
}
|
@ -11,8 +11,8 @@ param (
|
|||||||
$Type = "RO"
|
$Type = "RO"
|
||||||
)
|
)
|
||||||
|
|
||||||
[ADUser]$User = $null
|
$User = $null
|
||||||
[ADGroup]$Group = $null
|
$Group = $null
|
||||||
|
|
||||||
|
|
||||||
if(!$PSBoundParameters.ContainsKey("ProjectName")){
|
if(!$PSBoundParameters.ContainsKey("ProjectName")){
|
||||||
@ -61,7 +61,7 @@ if($null -eq $Group){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($PSBoundParameters.ContainsKey("Server")){
|
if($PSBoundParameters.ContainsKey("Server")){
|
||||||
$targeGroup | ForEach-Object {Add-ADGroupMember -Identity $_ -Members $User -Server $Server}
|
$targeGroup | ForEach-Object {Add-ADGroupMember -Identity $_ -Members $Identity -Server $Server}
|
||||||
} else {
|
} else {
|
||||||
$targeGroup | ForEach-Object {Add-ADGroupMember -Identity $_ -Members $User}
|
$targeGroup | ForEach-Object {Add-ADGroupMember -Identity $_ -Members $Identity}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user