From 98b5be249d48e5b69a2b93fe4acd928d4044fdf2 Mon Sep 17 00:00:00 2001 From: Marcelo Sizer <6205335+marcelosizer@users.noreply.github.com> Date: Mon, 11 May 2020 13:27:03 -0300 Subject: [PATCH] Update Get-PSWSUSClient.ps1 Add NameIncludes Property to ComputerScope ParameterSetName. Adds the possibility to search computers by name in Downstream Servers. --- Scripts/Get-PSWSUSClient.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Scripts/Get-PSWSUSClient.ps1 b/Scripts/Get-PSWSUSClient.ps1 index 67791dc..8c654b6 100644 --- a/Scripts/Get-PSWSUSClient.ps1 +++ b/Scripts/Get-PSWSUSClient.ps1 @@ -100,7 +100,9 @@ function Get-PSWSUSClient { [Parameter(ParameterSetName='ComputerScope')] [switch]$IncludeSubGroups, [Parameter(ParameterSetName='ComputerScope')] - [switch]$IncludeDownstreamComputerTargets + [switch]$IncludeDownstreamComputerTargets, + [Parameter(ParameterSetName='ComputerScope')] + [string]$NameIncludes ) Begin { if($wsus) @@ -138,6 +140,9 @@ function Get-PSWSUSClient { If ($PSBoundParameters['ComputerTargetGroups']) { [void]$ComputerScope.ComputerTargetGroups.AddRange($ComputerTargetGroups) } + If ($PSBoundParameters['NameIncludes']) { + $ComputerScope.NameIncludes = $NameIncludes + } } }#endif else