Compare commits

...

2 Commits

Author SHA1 Message Date
Karl-Wilfried Zimmer
81898676ed renamed function 2024-07-14 20:00:05 +02:00
Karl-Wilfried Zimmer
f701fb282f corrected casts 2024-07-14 19:59:42 +02:00
2 changed files with 8 additions and 8 deletions

View File

@ -11,8 +11,8 @@ param (
$Type = "RO"
)
[ADUser]$User = $null
[ADGroup]$Group = $null
$User = $null
$Group = $null
if(!$PSBoundParameters.ContainsKey("ProjectName")){
@ -61,7 +61,7 @@ if($null -eq $Group){
}
if($PSBoundParameters.ContainsKey("Server")){
Add-ADGroupMember -Identity $targeGroup -Members $User -Server $Server
Add-ADGroupMember -Identity $targeGroup -Members $Identity -Server $Server
} else {
Add-ADGroupMember -Identity $targeGroup -Members $User
Add-ADGroupMember -Identity $targeGroup -Members $Identity
}

View File

@ -11,8 +11,8 @@ param (
$Type = "RO"
)
[ADUser]$User = $null
[ADGroup]$Group = $null
$User = $null
$Group = $null
if(!$PSBoundParameters.ContainsKey("ProjectName")){
@ -61,7 +61,7 @@ if($null -eq $Group){
}
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 {
$targeGroup | ForEach-Object {Add-ADGroupMember -Identity $_ -Members $User}
$targeGroup | ForEach-Object {Add-ADGroupMember -Identity $_ -Members $Identity}
}