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 {