From 66281abe54e20abf9d548adb9d2fa46f28fda35e Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Sun, 14 Jul 2024 16:57:49 +0200 Subject: [PATCH] fixed some issues with getters --- GetACLs.ps1 | 2 +- GetProjectUsers.ps1 | 2 +- GetProjects.ps1 | 4 ++-- GetRoles.ps1 | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GetACLs.ps1 b/GetACLs.ps1 index 161e111..ec04169 100644 --- a/GetACLs.ps1 +++ b/GetACLs.ps1 @@ -4,7 +4,7 @@ param ( $Server ) -$Projects +$Projects=$null if($PSBoundParameters.ContainsKey("Server")){ $Projects = . .\GetProjects.ps1 -Server $Server } else { diff --git a/GetProjectUsers.ps1 b/GetProjectUsers.ps1 index 82d8fad..7b70fcc 100644 --- a/GetProjectUsers.ps1 +++ b/GetProjectUsers.ps1 @@ -8,7 +8,7 @@ param ( ) if($PSBoundParameters.ContainsKey('Name')){ - $Roles + $Roles=$null if($PSBoundParameters.ContainsKey('Server')){ $Roles = . .\GetRoles.ps1 -Server $Server | Where-Object Name -Match $Name } else { diff --git a/GetProjects.ps1 b/GetProjects.ps1 index 5219006..592e501 100644 --- a/GetProjects.ps1 +++ b/GetProjects.ps1 @@ -6,7 +6,7 @@ param ( . .\Variables.ps1 if($PSBoundParameters.ContainsKey("Server")){ - Get-ADGroup -Server $Server -SearchBase $Projects + Get-ADGroup -Server $Server -SearchBase $Projects -Filter 'GroupCategory -eq "Security"' } else { - Get-ADGroup -SearchBase $Projects + Get-ADGroup -SearchBase $Projects -Filter 'GroupCategory -eq "Security"' } \ No newline at end of file diff --git a/GetRoles.ps1 b/GetRoles.ps1 index 2387c13..dc11893 100644 --- a/GetRoles.ps1 +++ b/GetRoles.ps1 @@ -4,7 +4,7 @@ param ( $Server ) -$Projects +$Projects=$null if($PSBoundParameters.ContainsKey("Server")){ $Projects = . .\GetProjects.ps1 -Server $Server } else {