Update VMware.Skyline.InsightsApi.psm1
Moving the ParameterSetName checks to the process block instead of the begin block. Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
This commit is contained in:
@@ -281,7 +281,9 @@ Function Get-SkylineAffectedObject {
|
||||
|
||||
# Try to get results the first time
|
||||
$results = @()
|
||||
}
|
||||
|
||||
process {
|
||||
if ($PSCmdlet.ParameterSetName -eq 'ByName') {
|
||||
$procProduct = $product.Split($separator).Trim() | Where-Object {$_ -ne '' }
|
||||
# depending on separator we could end up with null rows on split, we'll omit those with where object
|
||||
@@ -291,9 +293,7 @@ Function Get-SkylineAffectedObject {
|
||||
if ($PSCmdlet.ParameterSetName -eq 'ByObject') {
|
||||
$procProduct = $products.products
|
||||
}
|
||||
}
|
||||
|
||||
process {
|
||||
|
||||
foreach ( $thisProduct in $procProduct ) {
|
||||
$thisQueryBody = $queryBody -Replace 'findingId: "",', "findingId: `"$findingId`","
|
||||
$thisQueryBody = $thisQueryBody -Replace 'product: "",', "product: `"$thisProduct`","
|
||||
|
||||
Reference in New Issue
Block a user