This repository was archived by the owner on Nov 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3134,13 +3134,13 @@ Function Get-VCFTask {
31343134
31353135 Param (
31363136 [Parameter (Mandatory = $false )] [ValidateNotNullOrEmpty ()] [String ]$id ,
3137- [Parameter (Mandatory = $false )] [ValidateNotNullOrEmpty ( )] [String ]$status
3137+ [Parameter (Mandatory = $false )] [ValidateSet ( " SUCCESSFUL " , " FAILED " )] [String ]$status
31383138 )
31393139
31403140 Try {
31413141 createHeader # Calls createHeader function to set Accept & Authorization
31423142 checkVCFToken # Calls the CheckVCFToken function to validate the access token and refresh if necessary
3143- if ( -not $PsBoundParameters.ContainsKey (" id" )) {
3143+ if ( -not $PsBoundParameters.ContainsKey (" id" ) -and ( -not $PsBoundParameters .ContainsKey ( " status " )) ) {
31443144 $uri = " https://$sddcManager /v1/tasks/"
31453145 $response = Invoke-RestMethod - Method GET - URI $uri - headers $headers
31463146 $response.elements
@@ -3151,7 +3151,7 @@ Function Get-VCFTask {
31513151 $response
31523152 }
31533153 if ($PsBoundParameters.ContainsKey (" status" )) {
3154- $uri = " https://$sddcManager /v1/tasks/$id "
3154+ $uri = " https://$sddcManager /v1/tasks/"
31553155 $response = Invoke-RestMethod - Method GET - URI $uri - headers $headers
31563156 $response.elements | Where-Object { $_.status -eq $status }
31573157 }
You can’t perform that action at this time.
0 commit comments