Compare commits
No commits in common. "81898676ed587c9693722128afd3003959cafea4" and "2bd7340a85988a2817fe164f689eff523ae5c450" have entirely different histories.
81898676ed
...
2bd7340a85
@ -11,8 +11,8 @@ param (
|
|||||||
$Type = "RO"
|
$Type = "RO"
|
||||||
)
|
)
|
||||||
|
|
||||||
$User = $null
|
[ADUser]$User = $null
|
||||||
$Group = $null
|
[ADGroup]$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 $Identity -Server $Server
|
Add-ADGroupMember -Identity $targeGroup -Members $User -Server $Server
|
||||||
} else {
|
} else {
|
||||||
Add-ADGroupMember -Identity $targeGroup -Members $Identity
|
Add-ADGroupMember -Identity $targeGroup -Members $User
|
||||||
}
|
}
|
@ -11,8 +11,8 @@ param (
|
|||||||
$Type = "RO"
|
$Type = "RO"
|
||||||
)
|
)
|
||||||
|
|
||||||
$User = $null
|
[ADUser]$User = $null
|
||||||
$Group = $null
|
[ADGroup]$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 $Identity -Server $Server}
|
$targeGroup | ForEach-Object {Add-ADGroupMember -Identity $_ -Members $User -Server $Server}
|
||||||
} else {
|
} else {
|
||||||
$targeGroup | ForEach-Object {Add-ADGroupMember -Identity $_ -Members $Identity}
|
$targeGroup | ForEach-Object {Add-ADGroupMember -Identity $_ -Members $User}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user