fixed some issues with getters

This commit is contained in:
Karl-Wilfried Zimmer 2024-07-14 16:57:49 +02:00
parent 9a5552a1e1
commit 66281abe54
4 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@ param (
$Server $Server
) )
$Projects $Projects=$null
if($PSBoundParameters.ContainsKey("Server")){ if($PSBoundParameters.ContainsKey("Server")){
$Projects = . .\GetProjects.ps1 -Server $Server $Projects = . .\GetProjects.ps1 -Server $Server
} else { } else {

View File

@ -8,7 +8,7 @@ param (
) )
if($PSBoundParameters.ContainsKey('Name')){ if($PSBoundParameters.ContainsKey('Name')){
$Roles $Roles=$null
if($PSBoundParameters.ContainsKey('Server')){ if($PSBoundParameters.ContainsKey('Server')){
$Roles = . .\GetRoles.ps1 -Server $Server | Where-Object Name -Match $Name $Roles = . .\GetRoles.ps1 -Server $Server | Where-Object Name -Match $Name
} else { } else {

View File

@ -6,7 +6,7 @@ param (
. .\Variables.ps1 . .\Variables.ps1
if($PSBoundParameters.ContainsKey("Server")){ if($PSBoundParameters.ContainsKey("Server")){
Get-ADGroup -Server $Server -SearchBase $Projects Get-ADGroup -Server $Server -SearchBase $Projects -Filter 'GroupCategory -eq "Security"'
} else { } else {
Get-ADGroup -SearchBase $Projects Get-ADGroup -SearchBase $Projects -Filter 'GroupCategory -eq "Security"'
} }

View File

@ -4,7 +4,7 @@ param (
$Server $Server
) )
$Projects $Projects=$null
if($PSBoundParameters.ContainsKey("Server")){ if($PSBoundParameters.ContainsKey("Server")){
$Projects = . .\GetProjects.ps1 -Server $Server $Projects = . .\GetProjects.ps1 -Server $Server
} else { } else {