From b81203e5620b555da11ae92f3aa078aeab0c94f1 Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Sun, 14 Jul 2024 19:50:50 +0200 Subject: [PATCH] identitiy of group being returned as an array --- AddUser.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AddUser.ps1 b/AddUser.ps1 index cbf759b..6a7cca4 100644 --- a/AddUser.ps1 +++ b/AddUser.ps1 @@ -11,8 +11,8 @@ param ( $Type = "RO" ) -$User = $null -$Group = $null +[ADUser]$User = $null +[ADGroup]$Group = $null if(!$PSBoundParameters.ContainsKey("ProjectName")){ @@ -50,9 +50,9 @@ if($null -eq $Group){ $targeGroup =$null if($PSBoundParameters.ContainsKey("Server")){ - $targeGroup = . .\GetRoles.ps1 -Server $Server -ProjectName $ProjectName + $targeGroup = . .\GetRoles.ps1 -Server $Server -ProjectName $ProjectName | Where-Object Name -Match $Type } else { - $targeGroup = . .\GetRoles.ps1 -ProjectName $ProjectName + $targeGroup = . .\GetRoles.ps1 -ProjectName $ProjectName | Where-Object Name -Match $Type } if($null -eq $Group){