From 771e546fb28456caadb3d9bc5286b4464aa2c6ed Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Fri, 15 Dec 2023 15:00:00 -0500 Subject: [PATCH 01/33] chore(ci): fix failing `actions/labeler` Reformatted the `actions/labeler` configuration for v5.0.0 requirements. Signed-off-by: Ryan Johnson --- .github/labeler-pull-requests.yml | 22 +++++++++++++++++ .github/workflows/pull-request-sizing.yml | 29 ----------------------- .github/workflows/pull-requests.yml | 27 +++++++++++++++++++++ 3 files changed, 49 insertions(+), 29 deletions(-) create mode 100644 .github/labeler-pull-requests.yml delete mode 100644 .github/workflows/pull-request-sizing.yml create mode 100644 .github/workflows/pull-requests.yml diff --git a/.github/labeler-pull-requests.yml b/.github/labeler-pull-requests.yml new file mode 100644 index 000000000..c0de566e2 --- /dev/null +++ b/.github/labeler-pull-requests.yml @@ -0,0 +1,22 @@ +--- +chore: + - changed-files: + - any-glob-to-any-file: + - ".ci/**/*" + - ".github/**/*" + - ".gitignore" +documentation: + - changed-files: + - any-glob-to-any-file: + - "**/*.md" + - "Makefile" + - "**/*.md" + - "mkdocs.yml" +github-actions: + - changed-files: + - any-glob-to-any-file: + - ".github/workflows/**/*" +needs-review: + - changed-files: + - any-glob-to-any-file: + - "**" diff --git a/.github/workflows/pull-request-sizing.yml b/.github/workflows/pull-request-sizing.yml deleted file mode 100644 index a83cefc54..000000000 --- a/.github/workflows/pull-request-sizing.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Pull Request Labels -'on': - - pull_request_target -jobs: - triage: - runs-on: ubuntu-latest - steps: - - uses: codelytv/pr-size-labeler@54ef36785e9f4cb5ecf1949cfc9b00dbb621d761 # v1.8.1 - with: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - xs_label: size/xs - xs_max_size: '10' - s_label: size/s - s_max_size: '100' - m_label: size/m - m_max_size: '500' - l_label: size/l - l_max_size: '1000' - xl_label: size/xl - fail_if_xl: 'false' - message_if_xl: > - 'This pull request exceeds the recommended size of 1000 lines - and might be rejected due to its size. - - - Please make sure you are not addressing multiple issues in a - pull request.’ - github_api_url: api.github.com diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml new file mode 100644 index 000000000..73c044ed9 --- /dev/null +++ b/.github/workflows/pull-requests.yml @@ -0,0 +1,27 @@ +--- +name: Pull Request Labels + +on: + pull_request_target: + branches: + - develop + types: + - opened + - synchronize + - reopened + - edited + - ready_for_review + +jobs: + labeler: + name: Labeler + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - name: Apply Labels + uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 + with: + configuration-path: .github/labeler-pull-requests.yml + repo-token: '${{ secrets.GITHUB_TOKEN }}' From 59ecfcd92451402a3af3873ac24588604bc8c2ae Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Mon, 18 Dec 2023 18:28:30 -0500 Subject: [PATCH 02/33] chore: update copyright Update copyright to 2005-2023 for the GitHub Pages deployment. Signed-off-by: Ryan Johnson --- mkdocs.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 9ddb62807..de5cd1bf0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,7 +13,7 @@ edit_uri: blob/main/docs/ # Copyright copyright: | - Copyright © 2023 Broadcom. All Rights Reserved.
+ Copyright © 2005-2023 Broadcom. All Rights Reserved.
The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

# Configuration @@ -89,8 +89,6 @@ extra: social: - icon: fontawesome/brands/github link: https://github.com/vmware/powershell-module-for-vmware-cloud-foundation - - icon: fontawesome/brands/twitter - link: https://twitter.com/powervcf - icon: fontawesome/solid/book link: https://docs.vmware.com/en/VMware-Cloud-Foundation/index.html - icon: fontawesome/solid/code From 960caaff340445b40f6b9e5509ccbfbd0efb3a79 Mon Sep 17 00:00:00 2001 From: Nathan Thaler Date: Wed, 3 Jan 2024 17:47:45 -0500 Subject: [PATCH 03/33] fix: increase `Get-VCFSystemPrecheckTask` output verbosity (#256) Signed-off-by: Nathan Thaler --- CHANGELOG.md | 6 ++++ PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 30 ++++++++++++++++--- .../Get-VCFSystemPrecheckTask.md | 22 ++++++++++++++ 4 files changed, 55 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74956fc70..02f0841a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## v2.5.0 + +> Released: Unreleased + +- Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`. + ## v2.4.1 > Released: 2023-12-15 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 695e5efeb..570bfc3b7 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.4.1.1000' +ModuleVersion = '2.5.0.1000' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index c06fd4d7a..3869b806c 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -4261,27 +4261,49 @@ Function Get-VCFSystemPrecheckTask { Retrieves the status of a system level precheck task. .DESCRIPTION - The Get-VCFSystemPrecheckTask mdlet retrieves the status of a system level precheck task that can be polled + The Get-VCFSystemPrecheckTask cmdlet retrieves the status of a system level precheck task that can be polled and monitored. .EXAMPLE Get-VCFSystemPrecheckTask -id 4d661acc-2be6-491d-9256-ba3c78020e5d This example shows how to retrieve the status of a system level precheck task by unique ID. + .EXAMPLE + Get-VCFSystemPrecheckTask -id 4d661acc-2be6-491d-9256-ba3c78020e5d -failureOnly + This example shows how to retrieve only failed subtasks from the system level precheck task by unique ID. + .PARAMETER id Specifies the unique ID of the system level precheck task. + + .PARAMETER failureOnly + Specifies to return only the failed subtasks. + #> Param ( - [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$id + [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$id, + [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [Switch]$failureOnly ) Try { createHeader # Set the Accept and Authorization headers. checkVCFToken # Validate the access token and refresh, if necessary. $uri = "https://$sddcManager/v1/system/prechecks/tasks/$id" - $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers -ContentType 'application/json' - $response + + Do { + # Keep checking until status is not IN_PROGRESS + $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers -ContentType 'application/json' + Start-Sleep -Seconds 2 + } While ($response.status -eq "IN_PROGRESS") + + if ($response.status -eq "FAILED" -and $PsBoundParameters.ContainsKey("failureOnly")) { + $failed_task = $response.subTasks | Where-Object { $_.status -eq "FAILED" } + $failed_subtask = $failed_task.stages | Where-Object { $_.status -eq "FAILED" } + $failed_subtask + } else { + $response + } + } Catch { ResponseException -object $_ } diff --git a/docs/documentation/functions/system-prechecks/Get-VCFSystemPrecheckTask.md b/docs/documentation/functions/system-prechecks/Get-VCFSystemPrecheckTask.md index aacdacc73..1531d7dcb 100644 --- a/docs/documentation/functions/system-prechecks/Get-VCFSystemPrecheckTask.md +++ b/docs/documentation/functions/system-prechecks/Get-VCFSystemPrecheckTask.md @@ -24,6 +24,14 @@ Get-VCFSystemPrecheckTask -id 4d661acc-2be6-491d-9256-ba3c78020e5d This example shows how to retrieve the status of a system level precheck task by unique ID. +### Example 2 + +```powershell +Get-VCFSystemPrecheckTask -id 4d661acc-2be6-491d-9256-ba3c78020e5d -failureOnly +``` + +This example shows how to retrieve only failed subtasks from the system level precheck task by unique ID. + ## Parameters ### -id @@ -41,7 +49,21 @@ Default value: None Accept pipeline input: False Accept wildcard characters: False ``` +### -failureOnly + +Specifies to return only the failed subtasks. + +```yaml +Type: Switch +Parameter Sets: (All) +Aliases: +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` ### Common Parameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). From b6afdcf2e6ecdae9caee6f816fbd51d35f175206 Mon Sep 17 00:00:00 2001 From: Nathan Thaler Date: Wed, 10 Jan 2024 17:20:55 -0500 Subject: [PATCH 04/33] feat: add `name` param to `Get-VCFPersonality` (#257) Updated `Get-VCFPersonality` cmdlet with optional parameter `name`. Signed-off-by: Nathan Thaler --- CHANGELOG.md | 2 ++ PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 23 +++++++++++++--- .../personalities/Get-VCFPersonality.md | 27 ++++++++++++++++++- 4 files changed, 49 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02f0841a3..17234946d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ > Released: Unreleased - Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`. +- Updated `Get-VCFPersonality` cmdlet with optional parameter `name`. + ## v2.4.1 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 570bfc3b7..8670bf87e 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1000' +ModuleVersion = '2.5.0.1001' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index 3869b806c..b08c56d16 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -3265,18 +3265,24 @@ Function Get-VCFPersonality { Get-VCFPersonality -id b4e3b2c4-31e8-4816-b1c5-801e848bef09 This example shows how to retrieve a vSphere Lifecycle Manager personality by unique ID. + .EXAMPLE + Get-VCFPersonality -name vSphere-8.0U1 + This example shows how to retrieve a vSphere Lifecycle Manager personality by name. + .PARAMETER id Specifies the unique ID of the vSphere Lifecycle Manager personality. #> Param ( - [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$id + [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$id, + [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$name ) Try { createHeader # Set the Accept and Authorization headers. checkVCFToken # Validate the access token and refresh, if necessary. - if ( -not $PsBoundParameters.ContainsKey("id")) { + + if ((-Not $PsBoundParameters.ContainsKey('id')) -and (-Not $PsBoundParameters.ContainsKey('name'))) { $uri = "https://$sddcManager/v1/personalities" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers $response.elements @@ -3285,7 +3291,18 @@ Function Get-VCFPersonality { $uri = "https://$sddcManager/v1/personalities/$id" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers $response - } + } + if ($PsBoundParameters.ContainsKey("name")) { + $uri ="https://$sddcManager/v1/personalities?personalityName=$name" + $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers + # depending on the composition of the image, the response body may or may not contain elements + if (!$response.elements) { + $response + } else { + $response.elements + } + } + } Catch { ResponseException -object $_ } diff --git a/docs/documentation/functions/personalities/Get-VCFPersonality.md b/docs/documentation/functions/personalities/Get-VCFPersonality.md index cacefa0fa..a0151aa44 100644 --- a/docs/documentation/functions/personalities/Get-VCFPersonality.md +++ b/docs/documentation/functions/personalities/Get-VCFPersonality.md @@ -7,7 +7,7 @@ Retrieves the vSphere Lifecycle Manager personalities. ## Syntax ```powershell -Get-VCFPersonality [[-id] ] [] +Get-VCFPersonality [[-id] ] [[-name] ] [] ``` ## Description @@ -32,6 +32,15 @@ Get-VCFPersonality -id b4e3b2c4-31e8-4816-b1c5-801e848bef09 This example shows how to retrieve a vSphere Lifecycle Manager personality by unique ID. +### Example 3 + +```powershell +Get-VCFPersonality -name vSphere-8.0U1 +``` + +This example shows how to retrieve a vSphere Lifecycle Manager personality by unique name. + + ## Parameters ### -id @@ -50,6 +59,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -name + +Specifies the unique name of the vSphere Lifecycle Manager personality. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### Common Parameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). From 07bc4e31f2dad7f8503c7911d41184a5fa5b8049 Mon Sep 17 00:00:00 2001 From: Nathan Thaler Date: Fri, 12 Jan 2024 15:13:17 -0500 Subject: [PATCH 05/33] feat: add `monitorStatus` optional param to `Get-VCFTask` (#259) Add `monitorStatus` optional param to `Get-VCFTask` to actively monitor a running task until it is no longer in progress. Signed-off by: Nathan Thaler --- CHANGELOG.md | 2 +- LICENSE | 2 +- Makefile | 2 +- NOTICE | 2 +- PowerVCF.psd1 | 6 ++--- PowerVCF.psm1 | 26 ++++++++++++++++--- README.md | 2 +- docs/community/index.md | 14 +++++----- .../functions/tasks/Get-VCFTask.md | 26 ++++++++++++++++++- mkdocs.yml | 7 +++-- 10 files changed, 66 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17234946d..8a6aa96f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`. - Updated `Get-VCFPersonality` cmdlet with optional parameter `name`. - +- Updated `Get-VCFTask` cmdlet with optional parameter `monitorStatus` ## v2.4.1 diff --git a/LICENSE b/LICENSE index 78243bc20..6911668eb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright 2023 Broadcom. All Rights Reserved. +Copyright 2023-2024 Broadcom. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/Makefile b/Makefile index 6413dff98..d752dd74f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright 2023 Broadcom. All Rights Reserved. +# Copyright 2023-2024 Broadcom. All Rights Reserved. # SPDX-License-Identifier: BSD-2 docs-install: diff --git a/NOTICE b/NOTICE index ec7d31557..7dc0cc0e8 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ PowerShell Module for VMware Cloud Foundation -Copyright 2023 Broadcom. All Rights Reserved. +Copyright 2023-2024 Broadcom. All Rights Reserved. This product is licensed to you under the BSD-2 license (the "License"). You may not use this product except in compliance with the BSD-2 License. diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 8670bf87e..3d3aa45d1 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -1,4 +1,4 @@ -# Copyright 2023 Broadcom. All Rights Reserved. +# Copyright 2023-2024 Broadcom. All Rights Reserved. # SPDX-License-Identifier: BSD-2 # Module manifest for module 'PowerVCF' @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1001' +ModuleVersion = '2.5.0.1002' # Supported PSEditions # CompatiblePSEditions = @() @@ -26,7 +26,7 @@ Author = 'Broadcom' CompanyName = 'Broadcom' # Copyright statement for this module -Copyright = 'Copyright 2023 Broadcom. All Rights Reserved.' +Copyright = 'Copyright 2023-2024 Broadcom. All Rights Reserved.' # Description of the functionality provided by this module Description = 'PowerShell Module for VMware Cloud Foundation' diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index b08c56d16..fc1be6a68 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -1,4 +1,4 @@ -# Copyright 2023 Broadcom. All Rights Reserved. +# Copyright 2023-2024 Broadcom. All Rights Reserved. # SPDX-License-Identifier: BSD-2 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE @@ -3291,8 +3291,8 @@ Function Get-VCFPersonality { $uri = "https://$sddcManager/v1/personalities/$id" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers $response - } - if ($PsBoundParameters.ContainsKey("name")) { + } + if ($PsBoundParameters.ContainsKey("name")) { $uri ="https://$sddcManager/v1/personalities?personalityName=$name" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers # depending on the composition of the image, the response body may or may not contain elements @@ -4352,15 +4352,23 @@ Function Get-VCFTask { Get-VCFTask -status SUCCESSFUL This example shows how to retrieve all tasks with a specific status. + .EXAMPLE + Get-VCFTask -id 7e1c2eee-3177-4e3b-84db-bfebc83f386a -monitorStatus + This example shows how to actively monitor a task until it completes. + .PARAMETER id Specifies the unique ID of the task. + .PARAMETER monitorStatus + Specifies the option to actively monitor a task until it completes + .PARAMETER status Specifies the status of the task. One of: SUCCESSFUL, FAILED. #> Param ( [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$id, + [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [Switch]$monitorStatus, [Parameter (Mandatory = $false)] [ValidateSet("SUCCESSFUL", "FAILED")] [String]$status ) @@ -4384,6 +4392,18 @@ Function Get-VCFTask { } } $response + if ($PsBoundParameters.ContainsKey("monitorStatus")) { + $pollCount = 0 + While ($response.status -eq "IN_PROGRESS") { + Write-Host "Task still in state IN_PROGRESS. Will re-poll in 30 seconds" + Start-Sleep -Seconds 30 + $pollCount++ + } + # return the updated task status if and only if the status has changed + if (($response.status -ne "IN_PROGRESS") -and $($pollCount) ) { + $response + } + } } elseif ($PsBoundParameters.ContainsKey("status")) { $uri = "https://$sddcManager/v1/tasks/" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers diff --git a/README.md b/README.md index fa2dea021..30bc9ac23 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ You can also start a discussion on the GitHub [discussions][gh-discussions] area ## License -Copyright 2023 Broadcom. All Rights Reserved. +Copyright 2023-2024 Broadcom. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/docs/community/index.md b/docs/community/index.md index 370f14414..1bac0dab0 100644 --- a/docs/community/index.md +++ b/docs/community/index.md @@ -5,10 +5,10 @@ This PowerShell module is the work of many contributors and the project team app Thank you for your interest in the project. Whether it's a bug report, enhancement, correction, or additional documentation, we greatly value feedback and contributions from our community. -Name | Title | Role | GitHub | -------------------|------------------------------------------|--------------|------------------------------------------------------------------| -Brian O'Connell | Staff II Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/LifeOfBrianOC) | -Gary Blake | Senior Staff Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/GaryJBlake) | -Ken Gould | Staff II Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/feardamhan) | -Ryan Johnson | Senior Staff Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/tenthirtyam) | -Giuliano Bertello | Staff Solutions Architect, VMware | Collaborator | [:fontawesome-brands-github:](https://github.com/GiulianoBerteo) | +Name | Role | GitHub | +------------------|--------------|------------------------------------------------------------------| +Brian O'Connell | Maintainer | [:fontawesome-brands-github:](https://github.com/LifeOfBrianOC) | +Gary Blake | Maintainer | [:fontawesome-brands-github:](https://github.com/GaryJBlake) | +Ken Gould | Maintainer | [:fontawesome-brands-github:](https://github.com/feardamhan) | +Ryan Johnson | Maintainer | [:fontawesome-brands-github:](https://github.com/tenthirtyam) | +Giuliano Bertello | Collaborator | [:fontawesome-brands-github:](https://github.com/GiulianoBerteo) | diff --git a/docs/documentation/functions/tasks/Get-VCFTask.md b/docs/documentation/functions/tasks/Get-VCFTask.md index 3225113f0..36f1e8d43 100644 --- a/docs/documentation/functions/tasks/Get-VCFTask.md +++ b/docs/documentation/functions/tasks/Get-VCFTask.md @@ -7,7 +7,7 @@ Retrieves a list of tasks. ## Syntax ```powershell -Get-VCFTask [[-id] ] [[-status] ] [] +Get-VCFTask [[-id] ] [[-status] ] [-monitorStatus] [] ``` ## Description @@ -40,6 +40,14 @@ Get-VCFTask -status SUCCESSFUL This example shows how to retrieve all tasks with a specific status. +### Example 4 + +```powershell +Get-VCFTask -id 7e1c2eee-3177-4e3b-84db-bfebc83f386a -monitorStatus +``` + +This example shows how to actively monitor the progress of a task until it completes. + ## Parameters ### -id @@ -74,6 +82,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -monitorStatus + +Specifies the option to monitor a task's progress. + +```yaml +Type: Switch +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### Common Parameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/mkdocs.yml b/mkdocs.yml index de5cd1bf0..2330a6cd2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,7 +13,7 @@ edit_uri: blob/main/docs/ # Copyright copyright: | - Copyright © 2005-2023 Broadcom. All Rights Reserved.
+ Copyright © 2005-2024 Broadcom. All Rights Reserved.
The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

# Configuration @@ -69,7 +69,6 @@ plugins: jinja_options: variable_start_string: "${{" variable_end_string: "}}" -- git-authors - git-revision-date-localized: enabled: !ENV [CI, false] enable_creation_date: false @@ -103,8 +102,8 @@ markdown_extensions: - footnotes - md_in_html - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg options: custom_icons: - material/.icons From 11c57b69aaa13ffa2bb63a7ea788ad0ff14db83d Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Tue, 16 Jan 2024 10:48:26 -0500 Subject: [PATCH 06/33] revert: add `monitorStatus` optional param to `Get-VCFTask` (#261) Reverts #259. Signed-off-by: Ryan Johnson --- CHANGELOG.md | 2 +- LICENSE | 2 +- Makefile | 2 +- NOTICE | 2 +- PowerVCF.psd1 | 6 ++--- PowerVCF.psm1 | 26 +++---------------- README.md | 2 +- docs/community/index.md | 14 +++++----- .../functions/tasks/Get-VCFTask.md | 26 +------------------ mkdocs.yml | 7 ++--- 10 files changed, 23 insertions(+), 66 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a6aa96f2..17234946d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`. - Updated `Get-VCFPersonality` cmdlet with optional parameter `name`. -- Updated `Get-VCFTask` cmdlet with optional parameter `monitorStatus` + ## v2.4.1 diff --git a/LICENSE b/LICENSE index 6911668eb..78243bc20 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright 2023-2024 Broadcom. All Rights Reserved. +Copyright 2023 Broadcom. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/Makefile b/Makefile index d752dd74f..6413dff98 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright 2023-2024 Broadcom. All Rights Reserved. +# Copyright 2023 Broadcom. All Rights Reserved. # SPDX-License-Identifier: BSD-2 docs-install: diff --git a/NOTICE b/NOTICE index 7dc0cc0e8..ec7d31557 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ PowerShell Module for VMware Cloud Foundation -Copyright 2023-2024 Broadcom. All Rights Reserved. +Copyright 2023 Broadcom. All Rights Reserved. This product is licensed to you under the BSD-2 license (the "License"). You may not use this product except in compliance with the BSD-2 License. diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 3d3aa45d1..8670bf87e 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -1,4 +1,4 @@ -# Copyright 2023-2024 Broadcom. All Rights Reserved. +# Copyright 2023 Broadcom. All Rights Reserved. # SPDX-License-Identifier: BSD-2 # Module manifest for module 'PowerVCF' @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1002' +ModuleVersion = '2.5.0.1001' # Supported PSEditions # CompatiblePSEditions = @() @@ -26,7 +26,7 @@ Author = 'Broadcom' CompanyName = 'Broadcom' # Copyright statement for this module -Copyright = 'Copyright 2023-2024 Broadcom. All Rights Reserved.' +Copyright = 'Copyright 2023 Broadcom. All Rights Reserved.' # Description of the functionality provided by this module Description = 'PowerShell Module for VMware Cloud Foundation' diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index fc1be6a68..b08c56d16 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -1,4 +1,4 @@ -# Copyright 2023-2024 Broadcom. All Rights Reserved. +# Copyright 2023 Broadcom. All Rights Reserved. # SPDX-License-Identifier: BSD-2 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE @@ -3291,8 +3291,8 @@ Function Get-VCFPersonality { $uri = "https://$sddcManager/v1/personalities/$id" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers $response - } - if ($PsBoundParameters.ContainsKey("name")) { + } + if ($PsBoundParameters.ContainsKey("name")) { $uri ="https://$sddcManager/v1/personalities?personalityName=$name" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers # depending on the composition of the image, the response body may or may not contain elements @@ -4352,23 +4352,15 @@ Function Get-VCFTask { Get-VCFTask -status SUCCESSFUL This example shows how to retrieve all tasks with a specific status. - .EXAMPLE - Get-VCFTask -id 7e1c2eee-3177-4e3b-84db-bfebc83f386a -monitorStatus - This example shows how to actively monitor a task until it completes. - .PARAMETER id Specifies the unique ID of the task. - .PARAMETER monitorStatus - Specifies the option to actively monitor a task until it completes - .PARAMETER status Specifies the status of the task. One of: SUCCESSFUL, FAILED. #> Param ( [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$id, - [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [Switch]$monitorStatus, [Parameter (Mandatory = $false)] [ValidateSet("SUCCESSFUL", "FAILED")] [String]$status ) @@ -4392,18 +4384,6 @@ Function Get-VCFTask { } } $response - if ($PsBoundParameters.ContainsKey("monitorStatus")) { - $pollCount = 0 - While ($response.status -eq "IN_PROGRESS") { - Write-Host "Task still in state IN_PROGRESS. Will re-poll in 30 seconds" - Start-Sleep -Seconds 30 - $pollCount++ - } - # return the updated task status if and only if the status has changed - if (($response.status -ne "IN_PROGRESS") -and $($pollCount) ) { - $response - } - } } elseif ($PsBoundParameters.ContainsKey("status")) { $uri = "https://$sddcManager/v1/tasks/" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers diff --git a/README.md b/README.md index 30bc9ac23..fa2dea021 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ You can also start a discussion on the GitHub [discussions][gh-discussions] area ## License -Copyright 2023-2024 Broadcom. All Rights Reserved. +Copyright 2023 Broadcom. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/docs/community/index.md b/docs/community/index.md index 1bac0dab0..370f14414 100644 --- a/docs/community/index.md +++ b/docs/community/index.md @@ -5,10 +5,10 @@ This PowerShell module is the work of many contributors and the project team app Thank you for your interest in the project. Whether it's a bug report, enhancement, correction, or additional documentation, we greatly value feedback and contributions from our community. -Name | Role | GitHub | -------------------|--------------|------------------------------------------------------------------| -Brian O'Connell | Maintainer | [:fontawesome-brands-github:](https://github.com/LifeOfBrianOC) | -Gary Blake | Maintainer | [:fontawesome-brands-github:](https://github.com/GaryJBlake) | -Ken Gould | Maintainer | [:fontawesome-brands-github:](https://github.com/feardamhan) | -Ryan Johnson | Maintainer | [:fontawesome-brands-github:](https://github.com/tenthirtyam) | -Giuliano Bertello | Collaborator | [:fontawesome-brands-github:](https://github.com/GiulianoBerteo) | +Name | Title | Role | GitHub | +------------------|------------------------------------------|--------------|------------------------------------------------------------------| +Brian O'Connell | Staff II Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/LifeOfBrianOC) | +Gary Blake | Senior Staff Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/GaryJBlake) | +Ken Gould | Staff II Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/feardamhan) | +Ryan Johnson | Senior Staff Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/tenthirtyam) | +Giuliano Bertello | Staff Solutions Architect, VMware | Collaborator | [:fontawesome-brands-github:](https://github.com/GiulianoBerteo) | diff --git a/docs/documentation/functions/tasks/Get-VCFTask.md b/docs/documentation/functions/tasks/Get-VCFTask.md index 36f1e8d43..3225113f0 100644 --- a/docs/documentation/functions/tasks/Get-VCFTask.md +++ b/docs/documentation/functions/tasks/Get-VCFTask.md @@ -7,7 +7,7 @@ Retrieves a list of tasks. ## Syntax ```powershell -Get-VCFTask [[-id] ] [[-status] ] [-monitorStatus] [] +Get-VCFTask [[-id] ] [[-status] ] [] ``` ## Description @@ -40,14 +40,6 @@ Get-VCFTask -status SUCCESSFUL This example shows how to retrieve all tasks with a specific status. -### Example 4 - -```powershell -Get-VCFTask -id 7e1c2eee-3177-4e3b-84db-bfebc83f386a -monitorStatus -``` - -This example shows how to actively monitor the progress of a task until it completes. - ## Parameters ### -id @@ -82,22 +74,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -monitorStatus - -Specifies the option to monitor a task's progress. - -```yaml -Type: Switch -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### Common Parameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/mkdocs.yml b/mkdocs.yml index 2330a6cd2..de5cd1bf0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,7 +13,7 @@ edit_uri: blob/main/docs/ # Copyright copyright: | - Copyright © 2005-2024 Broadcom. All Rights Reserved.
+ Copyright © 2005-2023 Broadcom. All Rights Reserved.
The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

# Configuration @@ -69,6 +69,7 @@ plugins: jinja_options: variable_start_string: "${{" variable_end_string: "}}" +- git-authors - git-revision-date-localized: enabled: !ENV [CI, false] enable_creation_date: false @@ -102,8 +103,8 @@ markdown_extensions: - footnotes - md_in_html - pymdownx.emoji: - emoji_index: !!python/name:material.extensions.emoji.twemoji - emoji_generator: !!python/name:material.extensions.emoji.to_svg + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg options: custom_icons: - material/.icons From af10d79bd293fa86cc4605a37a436ac53d34d801 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Tue, 16 Jan 2024 10:54:51 -0500 Subject: [PATCH 07/33] chore: update copyright (#262) Updates the copyright to 2023-2024. Signed-off-by: Ryan Johnson --- LICENSE | 2 +- Makefile | 2 +- NOTICE | 2 +- README.md | 2 +- docs/community/index.md | 14 +++++++------- docs/requirements.txt | 7 +++---- mkdocs.yml | 7 +++---- 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/LICENSE b/LICENSE index 78243bc20..6911668eb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright 2023 Broadcom. All Rights Reserved. +Copyright 2023-2024 Broadcom. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/Makefile b/Makefile index 6413dff98..d752dd74f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright 2023 Broadcom. All Rights Reserved. +# Copyright 2023-2024 Broadcom. All Rights Reserved. # SPDX-License-Identifier: BSD-2 docs-install: diff --git a/NOTICE b/NOTICE index ec7d31557..7dc0cc0e8 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ PowerShell Module for VMware Cloud Foundation -Copyright 2023 Broadcom. All Rights Reserved. +Copyright 2023-2024 Broadcom. All Rights Reserved. This product is licensed to you under the BSD-2 license (the "License"). You may not use this product except in compliance with the BSD-2 License. diff --git a/README.md b/README.md index fa2dea021..30bc9ac23 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ You can also start a discussion on the GitHub [discussions][gh-discussions] area ## License -Copyright 2023 Broadcom. All Rights Reserved. +Copyright 2023-2024 Broadcom. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/docs/community/index.md b/docs/community/index.md index 370f14414..1bac0dab0 100644 --- a/docs/community/index.md +++ b/docs/community/index.md @@ -5,10 +5,10 @@ This PowerShell module is the work of many contributors and the project team app Thank you for your interest in the project. Whether it's a bug report, enhancement, correction, or additional documentation, we greatly value feedback and contributions from our community. -Name | Title | Role | GitHub | -------------------|------------------------------------------|--------------|------------------------------------------------------------------| -Brian O'Connell | Staff II Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/LifeOfBrianOC) | -Gary Blake | Senior Staff Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/GaryJBlake) | -Ken Gould | Staff II Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/feardamhan) | -Ryan Johnson | Senior Staff Solutions Architect, VMware | Maintainer | [:fontawesome-brands-github:](https://github.com/tenthirtyam) | -Giuliano Bertello | Staff Solutions Architect, VMware | Collaborator | [:fontawesome-brands-github:](https://github.com/GiulianoBerteo) | +Name | Role | GitHub | +------------------|--------------|------------------------------------------------------------------| +Brian O'Connell | Maintainer | [:fontawesome-brands-github:](https://github.com/LifeOfBrianOC) | +Gary Blake | Maintainer | [:fontawesome-brands-github:](https://github.com/GaryJBlake) | +Ken Gould | Maintainer | [:fontawesome-brands-github:](https://github.com/feardamhan) | +Ryan Johnson | Maintainer | [:fontawesome-brands-github:](https://github.com/tenthirtyam) | +Giuliano Bertello | Collaborator | [:fontawesome-brands-github:](https://github.com/GiulianoBerteo) | diff --git a/docs/requirements.txt b/docs/requirements.txt index e1502187f..a3fb468c2 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,4 @@ -mkdocs-git-authors-plugin>=0.7.2 -mkdocs-git-revision-date-localized-plugin>=1.2.0 +mkdocs-git-revision-date-localized-plugin>=1.2.2 mkdocs-markdownextradata-plugin>=0.2.5 -mkdocs-minify-plugin>=0.7.1 -mkdocs-open-in-new-tab>=1.0.2 +mkdocs-minify-plugin>=0.7.2 +mkdocs-open-in-new-tab>=1.0.3 diff --git a/mkdocs.yml b/mkdocs.yml index de5cd1bf0..2330a6cd2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,7 +13,7 @@ edit_uri: blob/main/docs/ # Copyright copyright: | - Copyright © 2005-2023 Broadcom. All Rights Reserved.
+ Copyright © 2005-2024 Broadcom. All Rights Reserved.
The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

# Configuration @@ -69,7 +69,6 @@ plugins: jinja_options: variable_start_string: "${{" variable_end_string: "}}" -- git-authors - git-revision-date-localized: enabled: !ENV [CI, false] enable_creation_date: false @@ -103,8 +102,8 @@ markdown_extensions: - footnotes - md_in_html - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg options: custom_icons: - material/.icons From 89820158fef17985abbe7f869a29ea8891cf6eb8 Mon Sep 17 00:00:00 2001 From: Jared Burns Date: Wed, 31 Jan 2024 20:09:43 -0500 Subject: [PATCH 08/33] feat: add support for host commision ui json spec (#265) Added support for the JSON template from the SDDC Manager UI for host commission which differs from the API specification. This will allow for each the specification to be used with this module. Ref: #263 Signed-off-by: Jared Burns --- CHANGELOG.md | 4 +-- PowerVCF.psd1 | 6 ++-- PowerVCF.psm1 | 33 +++++++++++++++++-- .../hosts/New-VCFCommissionedHost.md | 10 ++++-- samples/hosts/ui-commissionHostsSpec.json | 32 ++++++++++++++++++ 5 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 samples/hosts/ui-commissionHostsSpec.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 17234946d..a9b7c78ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,11 @@ ## v2.5.0 -> Released: Unreleased +> Released: Unreleased - Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`. - Updated `Get-VCFPersonality` cmdlet with optional parameter `name`. - +- Enhanced `New-VCFCommissionedHost` cmdlet with ability to use the host commition JSON specification provided by the SDDC Manager UI. ## v2.4.1 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 8670bf87e..3d3aa45d1 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -1,4 +1,4 @@ -# Copyright 2023 Broadcom. All Rights Reserved. +# Copyright 2023-2024 Broadcom. All Rights Reserved. # SPDX-License-Identifier: BSD-2 # Module manifest for module 'PowerVCF' @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1001' +ModuleVersion = '2.5.0.1002' # Supported PSEditions # CompatiblePSEditions = @() @@ -26,7 +26,7 @@ Author = 'Broadcom' CompanyName = 'Broadcom' # Copyright statement for this module -Copyright = 'Copyright 2023 Broadcom. All Rights Reserved.' +Copyright = 'Copyright 2023-2024 Broadcom. All Rights Reserved.' # Description of the functionality provided by this module Description = 'PowerShell Module for VMware Cloud Foundation' diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index b08c56d16..01bdbd93b 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -1,4 +1,4 @@ -# Copyright 2023 Broadcom. All Rights Reserved. +# Copyright 2023-2024 Broadcom. All Rights Reserved. # SPDX-License-Identifier: BSD-2 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE @@ -2553,9 +2553,36 @@ Function New-VCFCommissionedHost { if ($MyInvocation.InvocationName -eq "Commission-VCFHost") { Write-Warning "Commission-VCFHost is deprecated and will be removed in a future release. Automatically redirecting to New-VCFCommissionedHost. Please refactor to New-VCFCommissionedHost at earliest opportunity." } - + $json_content = $json + $json_content = $json_content | ConvertFrom-Json + + # If the sample JSON payload from the SDDC Manager UO is used, transform to API specification. + if ($json.contains("hostfqdn")) { + $newjson_content = @() + foreach ($jsoninfo in $json_content.hostsSpec) { + $fqdn = $jsoninfo.hostfqdn + $networkPoolName = $jsoninfo.networkPoolName + $password = $jsoninfo.password + $username = $jsoninfo.username + $storageType = $jsoninfo.storageType + $networkId = Get-VCFNetworkPool -name $networkPoolName + $newjson_content += New-Object PSObject -Property @{ + 'fqdn' = $fqdn + 'networkPoolId' = $networkId.id + 'networkPoolName' = $networkPoolName + 'password' = $password + 'storageType' = $storageType + 'username' = $username + } + } + $jsonvalidation = ConvertTo-Json @($newjson_content) + $jsonBody = validateJsonInput -json $jsonvalidation + } else { + # If the JSON payload is already in the API specification, validate. + $jsonBody = validateJsonInput -json $json + } + Try { - $jsonBody = validateJsonInput -json $json createHeader # Set the Accept and Authorization headers. checkVCFToken # Validate the access token and refresh, if necessary. if ( -Not $PsBoundParameters.ContainsKey("validate")) { diff --git a/docs/documentation/functions/hosts/New-VCFCommissionedHost.md b/docs/documentation/functions/hosts/New-VCFCommissionedHost.md index 411d0ae18..be5980eb5 100644 --- a/docs/documentation/functions/hosts/New-VCFCommissionedHost.md +++ b/docs/documentation/functions/hosts/New-VCFCommissionedHost.md @@ -22,14 +22,20 @@ The `New-VCFCommissionedHost` cmdlet commissions a list of ESXi hosts. New-VCFCommissionedHost -json (Get-Content -Raw .\samples\hosts\commissionHostsSpec.json) ``` -This example shows how to commission a list of ESXi hosts using a JSON specification file. +This example shows how to commission a list of ESXi hosts using a JSON specification files. -???+ example "Sample JSON: Commission ESXi Host(s)" +???+ example "Sample JSON: Commission ESXi Host(s) from SDDC Manager API JSON Spec" ```json --8<-- "./samples/hosts/commissionHostsSpec.json" ``` +???+ example "Sample JSON: Commission ESXi Host(s) from the JSON Spec Provided by the SDDC Manager UI" + + ```json + --8<-- "./samples/hosts/ui-commissionHostsSpec.json" + ``` + ### Example 2 ```powershell diff --git a/samples/hosts/ui-commissionHostsSpec.json b/samples/hosts/ui-commissionHostsSpec.json new file mode 100644 index 000000000..ab5f04b5e --- /dev/null +++ b/samples/hosts/ui-commissionHostsSpec.json @@ -0,0 +1,32 @@ + { + "hostsSpec": [ + { + "hostfqdn": "sfo01-w01-esx01.sfo.rainpole.io", + "username": "root", + "storageType": "VSAN", + "password": "VMw@re1!", + "networkPoolName": "sfo-w01-np01" + }, + { + "hostfqdn": "sfo01-w01-esx02.sfo.rainpole.io", + "username": "root", + "storageType": "VSAN", + "password": "VMw@re1!", + "networkPoolName": "sfo-w01-np01" + }, + { + "hostfqdn": "sfo01-w01-esx03.sfo.rainpole.io", + "username": "root", + "storageType": "VSAN", + "password": "VMw@re1!", + "networkPoolName": "sfo-w01-np01" + }, + { + "hostfqdn": "sfo01-w01-esx04.sfo.rainpole.io", + "username": "root", + "storageType": "VSAN", + "password": "VMw@re1!", + "networkPoolName": "sfo-w01-np01" + } + ] +} \ No newline at end of file From 96785b892114fc39272564ed7ac403fc771053df Mon Sep 17 00:00:00 2001 From: Brian O'Connell Date: Thu, 1 Feb 2024 22:00:28 +0000 Subject: [PATCH 09/33] refactor: enhance workload domain and commission hosts (#269) Improved error handling: - `New-VCFWorkloadDomain` - `New-VCFCommissionedHost`. Added a `-validate` switch to `New-VCFWorkloadDomain` to validate the provided JSON before submitting. Signed-off-by: Brian O'Connell --- CHANGELOG.md | 3 + PowerVCF.psd1 | 4 +- PowerVCF.psm1 | 110 ++++++++++-------- .../domains/New-VCFWorkloadDomain.md | 23 +++- 4 files changed, 86 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9b7c78ff..ee9184928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ - Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`. - Updated `Get-VCFPersonality` cmdlet with optional parameter `name`. - Enhanced `New-VCFCommissionedHost` cmdlet with ability to use the host commition JSON specification provided by the SDDC Manager UI. +- Updated `New-VCFWorkloadDomain` cmdlet with optional parameter `validate` to validate the JSON specification. +- Enhanced `New-VCFWorkloadDomain` cmdlet to improve error handling. +- Enhanced `New-VCFCommissionedHost` cmdlet to improve error handling. ## v2.4.1 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 3d3aa45d1..d4c39e1f2 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -3,7 +3,7 @@ # Module manifest for module 'PowerVCF' # Generated by: Broadcom -# Generated on: 2023-12-15 +# Generated on: 2024-02-01 @{ @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1002' +ModuleVersion = '2.5.0.1003' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index 01bdbd93b..d4e45919d 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -19,7 +19,7 @@ if ($PSEdition -eq 'Desktop') { [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; If (!("TrustAllCertificatePolicy" -as [type])) { - add-type @" + add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertificatePolicy : ICertificatePolicy { @@ -31,7 +31,7 @@ if ($PSEdition -eq 'Desktop') { } } "@ -} + } [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertificatePolicy } @@ -106,7 +106,7 @@ public static class Placeholder { } } "@ -} + } [System.Net.ServicePointManager]::ServerCertificateValidationCallback = [placeholder]::GetDelegate() } @@ -193,7 +193,7 @@ public static class Placeholder { } } "@ -} + } [System.Net.ServicePointManager]::ServerCertificateValidationCallback = [placeholder]::GetDelegate() } @@ -1048,7 +1048,7 @@ Function Set-VCFCertificate { ) if ($PsBoundParameters.ContainsKey("json")) { - Try { + Try { $jsonBody = validateJsonInput -json $json createHeader # Set the Accept and Authorization headers. checkVCFToken # Validate the access token and refresh, if necessary. @@ -1173,12 +1173,10 @@ Function New-VCFCluster { $uri = "https://$sddcManager/v1/clusters" $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody $response - } - Catch { + } Catch { ResponseException -object $_ } - } - else { + } else { Write-Error "The validation task commpleted the run with the following problems: $($response.validationChecks.errorResponse.message)" } } Catch { @@ -1231,25 +1229,23 @@ Function Set-VCFCluster { Throw "You must include either -json or -markForDeletion" } - $jsonBody = validateJsonInput -json $json # validate input file and format - $response = Validate-VCFUpdateClusterSpec -clusterid $id -json $jsonBody # validate the JSON provided meets the cluster specifications format - # the validation API does not currently support polling with a task ID - Start-Sleep -Seconds 5 - # Submit the job only if the JSON validation task finished with executionStatus of COMPLETED and resultStatus of SUCCEEDED. - if ($response.executionStatus -eq "COMPLETED" -and $response.resultStatus -eq "SUCCEEDED") { - Try { - Write-Output "Task validation completed successfully. Invoking cluster task on SDDC Manager" - $uri = "https://$sddcManager/v1/clusters/$id/" - $response = Invoke-RestMethod -Method PATCH -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody - $response - } - Catch { - ResponseException -object $_ - } - } - else { - Write-Error "The validation task commpleted the run with the following problems: $($response.validationChecks.errorResponse.message)" + $jsonBody = validateJsonInput -json $json # validate input file and format + $response = Validate-VCFUpdateClusterSpec -clusterid $id -json $jsonBody # validate the JSON provided meets the cluster specifications format + # the validation API does not currently support polling with a task ID + Start-Sleep -Seconds 5 + # Submit the job only if the JSON validation task finished with executionStatus of COMPLETED and resultStatus of SUCCEEDED. + if ($response.executionStatus -eq "COMPLETED" -and $response.resultStatus -eq "SUCCEEDED") { + Try { + Write-Output "Task validation completed successfully. Invoking cluster task on SDDC Manager" + $uri = "https://$sddcManager/v1/clusters/$id/" + $response = Invoke-RestMethod -Method PATCH -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody + $response + } Catch { + ResponseException -object $_ } + } else { + Write-Error "The validation task commpleted the run with the following problems: $($response.validationChecks.errorResponse.message)" + } if ($PsBoundParameters.ContainsKey("markForDeletion") -and ($PsBoundParameters.ContainsKey("id"))) { $jsonBody = '{"markForDeletion": true}' @@ -1931,24 +1927,36 @@ Function New-VCFWorkloadDomain { #> Param ( - [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$json + [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$json, + [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [Switch]$validate ) Try { $jsonBody = validateJsonInput -json $json createHeader # Set the Accept and Authorization headers. checkVCFToken # Validate the access token and refresh, if necessary. - $response = Validate-WorkloadDomainSpec -json $jsonBody # Validate the JSON specification file. # the validation API does not currently support polling with a task ID - Start-Sleep -Seconds 5 - # Submit the job only if the JSON validation task completed with an executionStatus of COMPLETED and a resultStatus of SUCCEEDED. - if ($response.executionStatus -eq "COMPLETED" -and $response.resultStatus -eq "SUCCEEDED") { - Write-Output "Task validation completed successfully. Invoking Workload Domain Creation on SDDC Manager" - $uri = "https://$sddcManager/v1/domains" - $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody - Return $response - } else { - Write-Error "The validation task commpleted the run with the following problems:" - Write-Error $response.validationChecks.errorResponse.message + + if ( -Not $PsBoundParameters.ContainsKey("validate")) { + Do { + $response = Validate-WorkloadDomainSpec -json $jsonBody # Validate the JSON specification file. # the validation API does not currently support polling with a task ID + } + Until ($response.executionStatus -eq "COMPLETED") + # Submit the job only if the JSON validation task completed with an executionStatus of COMPLETED and a resultStatus of SUCCEEDED. + if ($response.executionStatus -eq "COMPLETED" -and $response.resultStatus -eq "SUCCEEDED") { + Write-Output "Task validation completed successfully. Invoking Workload Domain Creation on SDDC Manager" + $uri = "https://$sddcManager/v1/domains" + $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody + Return $response + } else { + Write-Error "The validation task commpleted the run with the following problems:" + Write-Output $response.validationChecks.errorResponse.message + } + } elseif ($PsBoundParameters.ContainsKey("validate")) { + Do { + $response = Validate-WorkloadDomainSpec -json $jsonBody # Validate the JSON specification file. # the validation API does not currently support polling with a task ID + } + Until ($response.executionStatus -eq "COMPLETED") + Return $response.validationChecks } } Catch { ResponseException -object $_ @@ -2600,7 +2608,8 @@ Function New-VCFCommissionedHost { $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody Return $response } else { - Write-Error "The validation task commpleted the run with the following problems: $($response.validationChecks.errorResponse.message)" + Write-Error "The validation task commpleted the run with the following problems:" + Write-Output $response.validationChecks.errorResponse } } elseif ($PsBoundParameters.ContainsKey("validate")) { $response = Validate-CommissionHostSpec -json $jsonBody # Validate the JSON specification file. @@ -2614,7 +2623,8 @@ Function New-VCFCommissionedHost { Write-Output "Task validation completed successfully." Return $response } else { - Write-Error "The validation task commpleted the run with the following problems: $($response.validationChecks.errorResponse.message)" + Write-Error "The validation task commpleted the run with the following problems:" + Write-Output $response.validationChecks.errorResponse } } } Catch { @@ -3319,8 +3329,8 @@ Function Get-VCFPersonality { $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers $response } - if ($PsBoundParameters.ContainsKey("name")) { - $uri ="https://$sddcManager/v1/personalities?personalityName=$name" + if ($PsBoundParameters.ContainsKey("name")) { + $uri = "https://$sddcManager/v1/personalities?personalityName=$name" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers # depending on the composition of the image, the response body may or may not contain elements if (!$response.elements) { @@ -3328,8 +3338,7 @@ Function Get-VCFPersonality { } else { $response.elements } - } - + } } Catch { ResponseException -object $_ } @@ -4649,10 +4658,10 @@ Function Start-VCFUpgrade { ) Try { - $jsonBody = validateJsonInput -json $json - createHeader # Set the Accept and Authorization headers. - checkVCFToken # Validate the access token and refresh, if necessary. - $uri = "https://$sddcManager/v1/upgrades" + $jsonBody = validateJsonInput -json $json + createHeader # Set the Accept and Authorization headers. + checkVCFToken # Validate the access token and refresh, if necessary. + $uri = "https://$sddcManager/v1/upgrades" $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody $response @@ -5131,8 +5140,7 @@ Function Set-VCFConfigurationNTP { $uri = "https://$sddcManager/v1/system/ntp-configuration/validations" $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody $response - } - else { + } else { $uri = "https://$sddcManager/v1/system/ntp-configuration" $response = Invoke-RestMethod -Method PUT -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody $response diff --git a/docs/documentation/functions/domains/New-VCFWorkloadDomain.md b/docs/documentation/functions/domains/New-VCFWorkloadDomain.md index 2931271af..620d0cec5 100644 --- a/docs/documentation/functions/domains/New-VCFWorkloadDomain.md +++ b/docs/documentation/functions/domains/New-VCFWorkloadDomain.md @@ -19,7 +19,7 @@ The `New-VCFWorkloadDomain` cmdlet creates a workload domain from a JSON specifi ### Example 1 ```powershell -New-VCFWorkloadDomain -json (Get-Content -Raw .\samples\domains\domainSpec.json) +New-VCFWorkloadDomain -json .\samples\domains\domainSpec.json ``` This example shows how to create a workload domain from a JSON specification file. @@ -35,6 +35,13 @@ This example shows how to create a workload domain from a JSON specification fil --8<-- "./samples/domains/isolatedDomainSpec.json" ``` +### Example 2 + +```powershell +New-VCFWorkloadDomain -json .\samples\domains\domainSpec.json -validate +``` + +This example shows how to validate the workload domain JSON specification file. ## Parameters ### -json @@ -52,7 +59,21 @@ Default value: None Accept pipeline input: False Accept wildcard characters: False ``` +### -validate + +Specifies to validate the JSON specification file. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` ### Common Parameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). From d97dcf6365a3cdcda9a08416476fd060c2dcf774 Mon Sep 17 00:00:00 2001 From: Jared Burns Date: Thu, 1 Feb 2024 17:05:37 -0500 Subject: [PATCH 10/33] chore: remove depreciated function aliases (#267) Removed all the aliased function names previously deprecated. - Removed `Commission-VCFHost` alias from `New-VCFCommissionedHost`. - Removed `Decommission-VCFHost` alias from `Remove-VCFCommissionedHost`. - Removed `Get-VCFNsxManagerCluster` alias from `Get-VCFNsxtCluster`. - Removed `Get-VCFNsxEdgeCluster` alias from `Get-VCFEdgeCluster`. - Removed `New-VCFNsxEdgeCluster` alias from `New-VCFEdgeCluster`. Signed-off-by: Jared Burns --- CHANGELOG.md | 7 ++++++- PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 22 +++++----------------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee9184928..876b1c303 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,15 @@ - Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`. - Updated `Get-VCFPersonality` cmdlet with optional parameter `name`. -- Enhanced `New-VCFCommissionedHost` cmdlet with ability to use the host commition JSON specification provided by the SDDC Manager UI. - Updated `New-VCFWorkloadDomain` cmdlet with optional parameter `validate` to validate the JSON specification. - Enhanced `New-VCFWorkloadDomain` cmdlet to improve error handling. - Enhanced `New-VCFCommissionedHost` cmdlet to improve error handling. +- Enhanced `New-VCFCommissionedHost` cmdlet with ability to use the host commission JSON specification provided by the SDDC Manager UI. +- Removed the deprecated `Commission-VCFHost` alias from `New-VCFCommissionedHost`. +- Removed the deprecated `Decommission-VCFHost` alias from `Remove-VCFCommissionedHost`. +- Removed the deprecated `Get-VCFNsxManagerCluster` alias from `Get-VCFNsxtCluster`. +- Removed the deprecated `Get-VCFNsxEdgeCluster` alias from `Get-VCFEdgeCluster`. +- Removed the deprecated `New-VCFNsxEdgeCluster` alias from `New-VCFEdgeCluster`. ## v2.4.1 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index d4c39e1f2..ab241caec 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1003' +ModuleVersion = '2.5.0.1004' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index d4e45919d..cd5bbe17f 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -2558,9 +2558,6 @@ Function New-VCFCommissionedHost { [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [Switch]$validate ) - if ($MyInvocation.InvocationName -eq "Commission-VCFHost") { - Write-Warning "Commission-VCFHost is deprecated and will be removed in a future release. Automatically redirecting to New-VCFCommissionedHost. Please refactor to New-VCFCommissionedHost at earliest opportunity." - } $json_content = $json $json_content = $json_content | ConvertFrom-Json @@ -2631,8 +2628,7 @@ Function New-VCFCommissionedHost { ResponseException -object $_ } } -New-Alias -name Commission-VCFHost -Value New-VCFCommissionedHost -Export-ModuleMember -Alias Commission-VCFHost -Function New-VCFCommissionedHost +Export-ModuleMember -Function New-VCFCommissionedHost Function Remove-VCFCommissionedHost { <# @@ -2654,10 +2650,6 @@ Function Remove-VCFCommissionedHost { [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$json ) - if ($MyInvocation.InvocationName -eq "Decommission-VCFHost") { - Write-Warning "Decommission-VCFHost is deprecated and will be removed in a future release. Automatically redirecting to Remove-VCFCommissionedHost. Please refactor to Remove-VCFCommissionedHost at earliest opportunity." - } - Try { $jsonBody = validateJsonInput -json $json createHeader # Set the Accept and Authorization headers. @@ -2669,8 +2661,7 @@ Function Remove-VCFCommissionedHost { ResponseException -object $_ } } -New-Alias -name Decommission-VCFHost -value Remove-VCFCommissionedHost -Export-ModuleMember -Alias Decommission-VCFHost -Function Remove-VCFCommissionedHost +Export-ModuleMember -Function Remove-VCFCommissionedHost #EndRegion APIs for managing Hosts @@ -3158,8 +3149,7 @@ Function Get-VCFNsxtCluster { ResponseException -object $_ } } -New-Alias -Name Get-VCFNsxManagerCluster -Value Get-VCFNsxtCluster -Export-ModuleMember -Function Get-VCFNsxtCluster -Alias Get-VCFNsxManagerCluster +Export-ModuleMember -Function Get-VCFNsxtCluster #EndRegion APIs for managing NSX Manager Clusters @@ -3207,8 +3197,7 @@ Function Get-VCFEdgeCluster { ResponseException -object $_ } } -New-Alias -Name Get-VCFNsxEdgeCluster -Value Get-VCFEdgeCluster -Export-ModuleMember -Function Get-VCFEdgeCluster -Alias Get-VCFNsxEdgeCluster +Export-ModuleMember -Function Get-VCFEdgeCluster Function New-VCFEdgeCluster { <# @@ -3278,8 +3267,7 @@ Function New-VCFEdgeCluster { ResponseException -object $_ } } -New-Alias -Name New-VCFNsxEdgeCluster -Value New-VCFEdgeCluster -Export-ModuleMember -Function New-VCFEdgeCluster -Alias New-VCFNsxEdgeCluster +Export-ModuleMember -Function New-VCFEdgeCluster #EndRegion APIs for managing NSX Edge Clusters From 242e50e3a281ecc3ca4e47b931459a6fe718152a Mon Sep 17 00:00:00 2001 From: William Lam Date: Sun, 4 Feb 2024 16:11:43 -0800 Subject: [PATCH 11/33] fix: update `New-VCFWorkloadDomain` (#271) Adds `PARAMETER` and `EXAMPLE` for `New-VCFWorkloadDomain -validate`. Ref: #270 Signed-off-by: William Lam Co-authored-by: William Lam --- PowerVCF.psd1 | 4 ++-- PowerVCF.psm1 | 9 ++++++++- .../functions/domains/New-VCFWorkloadDomain.md | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index ab241caec..2f325ac30 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -3,7 +3,7 @@ # Module manifest for module 'PowerVCF' # Generated by: Broadcom -# Generated on: 2024-02-01 +# Generated on: 2024-02-04 @{ @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1004' +ModuleVersion = '2.5.0.1005' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index cd5bbe17f..cdfedaff3 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -1919,11 +1919,18 @@ Function New-VCFWorkloadDomain { The New-VCFWorkloadDomain cmdlet creates a workload domain from a JSON specification file. .EXAMPLE - New-VCFWorkloadDomain -json (Get-Content -Raw .\samples\domains\domainSpec.json) + New-VCFWorkloadDomain -json .\samples\domains\domainSpec.json This example shows how to create a workload domain from a JSON specification file. + .EXAMPLE + New-VCFWorkloadDomain -json .\samples\domains\domainSpec.json -validate + This example shows how to validate workload domain JSON specification file supplied. + .PARAMETER json Specifies the JSON specification to be used. + + .PARAMETER validate + Validate the JSON specification file. #> Param ( diff --git a/docs/documentation/functions/domains/New-VCFWorkloadDomain.md b/docs/documentation/functions/domains/New-VCFWorkloadDomain.md index 620d0cec5..8b0be748a 100644 --- a/docs/documentation/functions/domains/New-VCFWorkloadDomain.md +++ b/docs/documentation/functions/domains/New-VCFWorkloadDomain.md @@ -42,6 +42,7 @@ New-VCFWorkloadDomain -json .\samples\domains\domainSpec.json -validate ``` This example shows how to validate the workload domain JSON specification file. + ## Parameters ### -json @@ -59,6 +60,7 @@ Default value: None Accept pipeline input: False Accept wildcard characters: False ``` + ### -validate Specifies to validate the JSON specification file. @@ -74,6 +76,7 @@ Default value: False Accept pipeline input: False Accept wildcard characters: False ``` + ### Common Parameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). From 0a197a6ceb9f2d8f0f7352fd914be61197f2f49b Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Mon, 12 Feb 2024 06:00:00 -0500 Subject: [PATCH 12/33] refactor: update `Invoke-VCFCommand` (#268) --- CHANGELOG.md | 1 + PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 131 +++++++++--------- .../functions/other/Invoke-VCFCommand.md | 127 +++++++++++++++++ .../functions/sos/Invoke-VCFCommand.md | 91 ------------ mkdocs.yml | 3 +- 6 files changed, 194 insertions(+), 161 deletions(-) create mode 100644 docs/documentation/functions/other/Invoke-VCFCommand.md delete mode 100644 docs/documentation/functions/sos/Invoke-VCFCommand.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 876b1c303..4671393ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Removed the deprecated `Get-VCFNsxManagerCluster` alias from `Get-VCFNsxtCluster`. - Removed the deprecated `Get-VCFNsxEdgeCluster` alias from `Get-VCFEdgeCluster`. - Removed the deprecated `New-VCFNsxEdgeCluster` alias from `New-VCFEdgeCluster`. +- Refactors `Invoke-VCFCommand` to run commands on SDDC Manager without the need for SSH across PowerShell editions and operating systems. ## v2.4.1 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 2f325ac30..6b50ddd35 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1005' +ModuleVersion = '2.5.0.1006' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index cdfedaff3..7f620a4e9 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -6042,96 +6042,91 @@ Function Validate-EdgeClusterSpec { #EndRegion APIs for managing Validations (Not Exported) -#Region SoS Operations +#Region Utility Functions (Exported) Function Invoke-VCFCommand { <# .SYNOPSIS - Connects to the specified SDDC Manager using SSH and invoke SSH commands (SoS). + Run a command on SDDC Manager. .DESCRIPTION - The Invoke-VCFCommand cmdlet connects to the specified SDDC Manager over SSH using vcf user and subsequently - run elevated SOS commands using the root account. + The Invoke-VCFCommand cmdlet runs a command within the SDDC Manager appliance. .EXAMPLE - Invoke-VCFCommand -vcfpassword VMware1! -rootPassword VMware1! -sosOption general-health - This example will run and display the output of "/opt/vmware/sddc-support/sos --general-health". + Invoke-VCFCommand -server sfo-vcf01.sfo.rainpole.io -user admin@local -pass VMw@re1!VMw@re1! -vmUser vcf -vmPass VMw@re1! -command "echo Hello World." + This example runs the command provided on the SDDC Manager appliance as the vcf user. - .EXAMPLE - Invoke-VCFCommand -sosOption general-health - This example will ask for vcf and root password to the user and then run and display the output of "/opt/vmware/sddc-support/sos --general-health". + .PARAMETER server + The fully qualified domain name of the SDDC Manager. + + .PARAMETER user + The username to authenticate to the SDDC Manager. + + .PARAMETER pass + The password to authenticate to the SDDC Manager. + + .PARAMETER vmUser + The username to authenticate to the virtual machine. + + .PARAMETER vmPass + The password to authenticate to the virtual machine. + + .PARAMETER command + The command to run on the virtual machine. #> Param ( - [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String] $vcfPassword, - [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String] $rootPassword, - [Parameter (Mandatory = $true)] [ValidateSet("general-health", "compute-health", "ntp-health", "password-health", "get-vcf-summary", "get-inventory-info", "get-host-ips", "get-vcf-services-summary")] [String] $sosOption + [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$server, + [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$user, + [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$pass, + [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$vmUser, + [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$vmPass, + [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$command ) - $poshSSH = Resolve-PSModule -moduleName "Posh-SSH" # POSH module is required, if not present skipping - if ($poshSSH -eq "ALREADY_IMPORTED" -or $poshSSH -eq "IMPORTED" -or $poshSSH -eq "INSTALLED_IMPORTED") { - # Expected sudo prompt from SDDC Manager for elevated commands. - $sudoPrompt = "[sudo] password for vcf" - # Validate if the SDDC Manager vcf password parameter is passed. If not, prompt the user and then build vcfCreds PSCredential object. - if ( -not $PsBoundParameters.ContainsKey("vcfPassword") ) { - Write-Output "Please provide the SDDC Manager vcf user password:" - $vcfSecuredPassword = Read-Host -AsSecureString - $vcfCred = New-Object System.Management.Automation.PSCredential ('vcf', $vcfSecuredPassword) - } else { - # Convert the clear text input password to secure string. - $vcfSecuredPassword = ConvertTo-SecureString $vcfPassword -AsPlainText -Force - # Build credential object. - $vcfCred = New-Object System.Management.Automation.PSCredential ('vcf', $vcfSecuredPassword) - } - # Validate if the SDDC Manager root password parameter is passed. If not, prompt the user and then build rootCreds PSCredential object. - if ( -not $PsBoundParameters.ContainsKey("rootPassword") ) { - Write-Output "Please provide the root credential to run elevated commands in SDDC Manager:" - $rootSecuredPassword = Read-Host -AsSecureString - $rootCred = New-Object System.Management.Automation.PSCredential ('root', $rootSecuredPassword) - } else { - # Convert the clear text input password to secure string. - $rootSecuredPassword = ConvertTo-SecureString $rootPassword -AsPlainText -Force - # Build credential object. - $rootCred = New-Object System.Management.Automation.PSCredential ('root', $rootSecuredPassword) - } - # Depending on the SoS command, there will be a different pattern to match at the end of the ssh stream output. - switch ($sosOption) { - "general-health" { $sosEndMessage = "For detailed report" } - "compute-health" { $sosEndMessage = "Health Check completed" } - "ntp-health" { $sosEndMessage = "For detailed report" } - "password-health" { $sosEndMessage = "completed" } - "get-inventory-info" { $sosEndMessage = "Health Check completed" } - "get-vcf-summary" { $sosEndMessage = "SOLUTIONS_MANAGER" } - "get-host-ips" { $sosEndMessage = "Health Check completed" } - "get-vcf-services-summary" { $sosEndMessage = "VCF SDDC Manager Uptime" } - } + $vcfWorkloadDomainDetails = Get-VCFWorkloadDomain | Where-Object { $_.type -eq "MANAGEMENT" } + $vcenterServerDetails = Get-VCFvCenter | Where-Object { $_.fqdn -eq $vcfWorkloadDomainDetails.vcenters.fqdn } - # Create SSH session to SDDC Manager using vcf user. By default, SSH is disabled for the root account. - Try { - $sessionSSH = New-SSHSession -Computer $sddcManager -Credential $vcfCred -AcceptKey - } Catch { - $errorString = ResponseException; Write-Error $errorString + if ($PSVersionTable.PSEdition -eq 'Core') { + if (!($status = Test-Connection -TargetName $vcfWorkloadDomainDetails.vcenters.fqdn -TcpPort 443 -Quiet)) { + Throw "Unable to connect to Management Domain vCenter Server ($vcfWorkloadDomainDetails.vcenters.fqdn)." } - if ($sessionSSH.Connected -eq "True") { - $stream = $SessionSSH.Session.CreateShellStream("PS-SSH", 0, 0, 0, 0, 1000) - # Build the SOS command to run. - $sshCommand = "sudo /opt/vmware/sddc-support/sos " + "--" + $sosOption - # Invoke the SSH stream command. - $outInvoke = Invoke-SSHStreamExpectSecureAction -ShellStream $stream -Command $sshCommand -ExpectString $sudoPrompt -SecureAction $rootCred.Password - if ($outInvoke) { - Write-Output "Running the remote SoS command. Output will display when the the run is completed. This might take a while, please wait..." - $stream.Expect($sosEndMessage) - } - # Destroy the connection previously established. - Remove-SSHSession -SessionId $sessionSSH.SessionId | Out-Null + } elseif ($PSVersionTable.PSEdition -eq 'Desktop') { + $OriginalProgressPreference = $Global:ProgressPreference; $Global:ProgressPreference = 'SilentlyContinue' + if (!($status = Test-NetConnection -ComputerName $vcfWorkloadDomainDetails.vcenters.fqdn -Port 443 -WarningAction SilentlyContinue)) { + $Global:ProgressPreference = $OriginalProgressPreference + Throw "Unable to connect to Management Domain vCenter Server ($vcfWorkloadDomainDetails.vcenters.fqdn)." } + $Global:ProgressPreference = $OriginalProgressPreference + } + + $vcfDetail = Get-VCFRelease -domainId $vcfWorkloadDomainDetails.id + + if ( ($vcfDetail.version).Split("-")[0] -ge "4.5.0.0") { + $pscCredentialDetails = Get-VCFCredential | Where-Object { $_.resource.resourceType -eq "PSC" -and ($_.username).Split('@')[-1] -eq $vcfWorkloadDomainDetails.ssoName } } else { - Write-Error "PowerShell Module Posh-SSH staus is: $poshSSH. Posh-SSH is required to run this cmdlet. Please install the module and try again." + $pscCredentialDetails = Get-VCFCredential | Where-Object { $_.resource.resourceType -eq "PSC" } + } + + Connect-VIServer -Server $vcenterServerDetails.fqdn -User $pscCredentialDetails.username -Password $pscCredentialDetails.password -WarningAction SilentlyContinue | Out-Null + + if ($DefaultVIServer.Name -ne $vcenterServerDetails.fqdn) { + Throw "Unable to authenticate to Management Domain vCenter Server ($vcfWorkloadDomainDetails.vcenters.fqdn), check credentials and try again." + } + + Try { + $output = Invoke-VMScript -VM ($server.Split(".")[0]) -ScriptText $command -GuestUser $vmUser -GuestPassword $vmPass -Server $vcenterServerDetails.fqdn + $output + } Catch { + throw "Error executing command: $_" + } Finally { + Disconnect-VIServer -Server $vcenterServerDetails.fqdn -Confirm:$false -WarningAction SilentlyContinue | Out-Null } } Export-ModuleMember -Function Invoke-VCFCommand -#EndRegion SoS Operations + +#EndRegion Utility Functions (Exported) #Region Utility Functions (Not Exported) diff --git a/docs/documentation/functions/other/Invoke-VCFCommand.md b/docs/documentation/functions/other/Invoke-VCFCommand.md new file mode 100644 index 000000000..9dcf10a73 --- /dev/null +++ b/docs/documentation/functions/other/Invoke-VCFCommand.md @@ -0,0 +1,127 @@ +# Invoke-VCFCommand + +## Synopsis + +Run a command on SDDC Manager. + +## Syntax + +```powershell +Invoke-VCFCommand [-server] [-user] [-pass] [-vmUser] [-vmPass] [-command] [] +``` + +## Description + +The `Invoke-VCFCommand` cmdlet runs a command within the SDDC Manager appliance. + +## Examples + +### Example 1 + +```powershell +Invoke-VCFCommand -server sfo-vcf01.sfo.rainpole.io -user admin@local -pass VMw@re1!VMw@re1! -vmUser vcf -vmPass VMw@re1! -command "echo Hello World." +``` + +This example runs the command provided on the SDDC Manager appliance as the `vcf` user. + +## Parameters + +### -server + +The fully qualified domain name of the SDDC Manager. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -user + +The username to authenticate to the SDDC Manager. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -pass + +The password to authenticate to the SDDC Manager. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmUser + +The username to authenticate to the virtual machine. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -vmPass + +The password to authenticate to the virtual machine. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -command + +The command to run on the virtual machine. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### Common Parameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sos/Invoke-VCFCommand.md b/docs/documentation/functions/sos/Invoke-VCFCommand.md deleted file mode 100644 index ada995040..000000000 --- a/docs/documentation/functions/sos/Invoke-VCFCommand.md +++ /dev/null @@ -1,91 +0,0 @@ -# Invoke-VCFCommand - -## Synopsis - -Connects to the specified SDDC Manager using SSH and invoke SSH commands (SoS). - -## Syntax - -```powershell -Invoke-VCFCommand [[-vcfPassword] ] [[-rootPassword] ] [-sosOption] [] -``` - -## Description - -The `Invoke-VCFCommand` cmdlet connects to the specified SDDC Manager over SSH using the `vcf` user and subsequently run elevated SOS commands using the `root` account. - -???+ note "Note" - - The `Invoke-VCFCommand` cmdlet requires the `POSH-SSH` module to be installed. - -## Examples - -### Example 1 - -```powershell -Invoke-VCFCommand -vcfpassword VMware1! -rootPassword VMware1! -sosOption general-health -``` - -This example will run and display the output of "/opt/vmware/sddc-support/sos --general-health". - -### Example 2 - -```powershell -Invoke-VCFCommand -sosOption general-health -``` - -This example will ask for vcf and root password to the user and then run and display the output of "/opt/vmware/sddc-support/sos --general-health". - -## Parameters - -### -vcfPassword - -{{ Fill vcfPassword Description }} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -rootPassword - -{{ Fill rootPassword Description }} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -sosOption - -{{ Fill sosOption Description }} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### Common Parameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/mkdocs.yml b/mkdocs.yml index 2330a6cd2..96ef2701c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -278,7 +278,6 @@ nav: - documentation/functions/sos/Get-VCFHealthSummaryTask.md - documentation/functions/sos/Request-VCFHealthSummaryBundle.md - documentation/functions/sos/Start-VCFHealthSummary.md - - documentation/functions/sos/Invoke-VCFCommand.md - Support Bundles: - documentation/functions/sos/Get-VCFSupportBundleTask.md - documentation/functions/sos/Request-VCFSupportBundle.md @@ -312,6 +311,8 @@ nav: - documentation/functions/aria-suite/aria-operations-logs/Set-VCFVrliConnection.md - Workspace ONE Access: - documentation/functions/aria-suite/workspace-one-access/Get-VCFWsa.md + - Other: + - documentation/functions/other/Invoke-VCFCommand.md - Community: - community/index.md - Contributing: community/contributing.md From 7f26f98fa71d5f23462487d7685d7f60b7c5cdcd Mon Sep 17 00:00:00 2001 From: Brian O'Connell Date: Thu, 22 Feb 2024 09:38:10 +0000 Subject: [PATCH 13/33] feat:add support for exporting bringup json from P&P (#272) - Added `Export-VCFManagementDomainJsonSpec` to export json spec for bringup - Update docs/documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md Signed-off-by: Brian O'Connell Co-authored-by: Gary Blake <31245616+GaryJBlake@users.noreply.github.com> --- CHANGELOG.md | 1 + PowerVCF.psd1 | 4 +- PowerVCF.psm1 | 597 ++++++++++++++++++ .../Export-VCFManagementDomainJsonSpec.md | 63 ++ mkdocs.yml | 2 + 5 files changed, 665 insertions(+), 2 deletions(-) create mode 100644 docs/documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 4671393ae..4fcf35fa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Removed the deprecated `Get-VCFNsxEdgeCluster` alias from `Get-VCFEdgeCluster`. - Removed the deprecated `New-VCFNsxEdgeCluster` alias from `New-VCFEdgeCluster`. - Refactors `Invoke-VCFCommand` to run commands on SDDC Manager without the need for SSH across PowerShell editions and operating systems. +- Added `Export-VCFManagementDomainJsonSpec` to export the JSON spec required for bringup from the Planning & Preparation Excel workbook. ## v2.4.1 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 6b50ddd35..d0a396536 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -3,7 +3,7 @@ # Module manifest for module 'PowerVCF' # Generated by: Broadcom -# Generated on: 2024-02-04 +# Generated on: 2024-02-21 @{ @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1006' +ModuleVersion = '2.5.0.1007' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index 7f620a4e9..7ad69739f 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -6327,3 +6327,600 @@ Function Debug-CatchWriter { Export-ModuleMember -Function Debug-CatchWriter #EndRegion Useful Script Functions + + +#Region JSON Export Functions +Function Export-VCFManagementDomainJsonSpec { + + Param ( + [Parameter (Mandatory = $true)] [String]$workbook, + [Parameter (Mandatory = $true)] [String]$jsonPath + ) + # Confirm the presence of ImportExcel module + if (!(Get-InstalledModule -name "ImportExcel" -MinimumVersion 7.8.5 -ErrorAction SilentlyContinue)) { + Write-Host " ImportExcel PowerShell module not found. Please install manually" -ForegroundColor Yellow + } else { + Write-Output " ImportExcel PowerShell module found" -ForegroundColor Green + } + + $Global:vcfVersion = @("v4.3.x", "v4.4.x", "v4.5.x", "v5.0.x", "v5.1.x") + Try { + + $module = "Management Domain JSON Spec" + Write-Output "Starting the Process of Generating the $module" + $pnpWorkbook = Open-ExcelPackage -Path $Workbook + + if ($pnpWorkbook.Workbook.Names["vcf_version"].Value -notin $vcfVersion) { + Write-Output "Planning and Preparation Workbook Provided Not Supported" + Break + } + + if ($pnpWorkbook.Workbook.Names["vcf_plus_result"].Value -eq "Included") { + $nsxtLicense = "" + $esxLicense = "" + $vsanLicense = "" + $vcenterLicense = "" + } else { + $nsxtLicense = $pnpWorkbook.Workbook.Names["nsxt_license"].Value + $esxLicense = $pnpWorkbook.Workbook.Names["esx_std_license"].Value + $vsanLicense = $pnpWorkbook.Workbook.Names["vsan_license"].Value + $vcenterLicense = $pnpWorkbook.Workbook.Names["vc_license"].Value + } + + # Check if management vm network is being used + if (!($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_cidr"]) -or $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_cidr"].Value -eq "Value Missing") { + $esxMgmtCidr = ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_cidr"].Value.split("/"))[1] + $vmMgmtCidr = ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_cidr"].Value.split("/"))[1] + } else { + $esxMgmtCidr = ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_cidr"].Value.split("/"))[1] + $vmMgmtCidr = ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_cidr"].Value.split("/"))[1] + } + + $esxManagmentMaskObject = ([IPAddress] ([Convert]::ToUInt64((("1" * $esxMgmtCidr) + ("0" * (32 - $esxMgmtCidr))), 2))) + $vmManagmentMaskObject = ([IPAddress] ([Convert]::ToUInt64((("1" * $vmMgmtCidr) + ("0" * (32 - $vmMgmtCidr))), 2))) + + $ntpServers = New-Object System.Collections.ArrayList + if ($pnpWorkbook.Workbook.Names["region_dns2_ip"].Value -eq "n/a") { + [Array]$ntpServers = $pnpWorkbook.Workbook.Names["region_dns1_ip"].Value + } else { + [Array]$ntpServers = $pnpWorkbook.Workbook.Names["region_dns1_ip"].Value, $pnpWorkbook.Workbook.Names["region_dns2_ip"].Value + } + + $dnsObject = @() + $dnsObject += [pscustomobject]@{ + 'domain' = $pnpWorkbook.Workbook.Names["region_ad_parent_fqdn"].Value + 'subdomain' = $pnpWorkbook.Workbook.Names["region_ad_child_fqdn"].Value + 'nameserver' = $pnpWorkbook.Workbook.Names["region_dns1_ip"].Value + 'secondaryNameserver' = $pnpWorkbook.Workbook.Names["region_dns2_ip"].Value + } + + $rootUserObject = @() + $rootUserObject += [pscustomobject]@{ + 'username' = "root" + 'password' = $pnpWorkbook.Workbook.Names["sddc_mgr_root_password"].Value + } + + $secondUserObject = @() + $secondUserObject += [pscustomobject]@{ + 'username' = "vcf" + 'password' = $pnpWorkbook.Workbook.Names["sddc_mgr_vcf_password"].Value + } + + $restApiUserObject = @() + $restApiUserObject += [pscustomobject]@{ + 'username' = "admin" + 'password' = $pnpWorkbook.Workbook.Names["sddc_mgr_admin_local_password"].Value + } + + $sddcManagerObject = @() + $sddcManagerObject += [pscustomobject]@{ + 'hostname' = $pnpWorkbook.Workbook.Names["sddc_mgr_hostname"].Value + 'ipAddress' = $pnpWorkbook.Workbook.Names["sddc_mgr_ip"].Value + 'netmask' = $vmManagmentMaskObject.IPAddressToString + 'localUserPassword' = $pnpWorkbook.Workbook.Names["sddc_mgr_admin_local_password"].Value + rootUserCredentials = ($rootUserObject | Select-Object -Skip 0) + restApiCredentials = ($restApiUserObject | Select-Object -Skip 0) + secondUserCredentials = ($secondUserObject | Select-Object -Skip 0) + } + + $vmnics = New-Object System.Collections.ArrayList + [Array]$vmnics = $($pnpWorkbook.Workbook.Names["primary_vds_vmnics"].Value.Split(',')[0]), $($pnpWorkbook.Workbook.Names["primary_vds_vmnics"].Value.Split(',')[1]) + + $networks = New-Object System.Collections.ArrayList + if ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_pg"].Value -eq "Value Missing") { + [Array]$networks = "MANAGEMENT", "VMOTION", "VSAN" + } else { + [Array]$networks = "MANAGEMENT", "VMOTION", "VSAN", "VM_MANAGEMENT" + } + + $vmotionIpObject = @() + $vmotionIpObject += [pscustomobject]@{ + 'startIpAddress' = $pnpWorkbook.Workbook.Names["mgmt_az1_vmotion_pool_start_ip"].Value + 'endIpAddress' = $pnpWorkbook.Workbook.Names["mgmt_az1_vmotion_pool_end_ip"].Value + } + + $vsanIpObject = @() + $vsanIpObject += [pscustomobject]@{ + 'startIpAddress' = $pnpWorkbook.Workbook.Names["mgmt_az1_vsan_pool_start_ip"].Value + 'endIpAddress' = $pnpWorkbook.Workbook.Names["mgmt_az1_vsan_pool_end_ip"].Value + } + + $vmotionMtu = $pnpWorkbook.Workbook.Names["mgmt_az1_vmotion_mtu"].Value -as [string] + $vsanMtu = $pnpWorkbook.Workbook.Names["mgmt_az1_vsan_mtu"].Value -as [string] + $dvsMtu = [INT]$pnpWorkbook.Workbook.Names["primary_vds_mtu"].Value + + $networkObject = @() + $networkObject += [pscustomobject]@{ + 'networkType' = "MANAGEMENT" + 'subnet' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_cidr"].Value + 'vlanId' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vlan"].Value -as [string] + 'mtu' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_mtu"].Value -as [string] + 'gateway' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_gateway_ip"].Value + 'portGroupKey' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_pg"].Value + } + $networkObject += [pscustomobject]@{ + 'networkType' = "VMOTION" + 'subnet' = $pnpWorkbook.Workbook.Names["mgmt_az1_vmotion_cidr"].Value + includeIpAddressRanges = $vmotionIpObject + 'vlanId' = $pnpWorkbook.Workbook.Names["mgmt_az1_vmotion_vlan"].Value -as [string] + 'mtu' = $pnpWorkbook.Workbook.Names["mgmt_az1_vmotion_mtu"].Value -as [string] + 'gateway' = $pnpWorkbook.Workbook.Names["mgmt_az1_vmotion_gateway_ip"].Value + 'portGroupKey' = $pnpWorkbook.Workbook.Names["mgmt_az1_vmotion_pg"].Value + } + $networkObject += [pscustomobject]@{ + 'networkType' = "VSAN" + 'subnet' = $pnpWorkbook.Workbook.Names["mgmt_az1_vsan_cidr"].Value + includeIpAddressRanges = $vsanIpObject + 'vlanId' = $pnpWorkbook.Workbook.Names["mgmt_az1_vsan_vlan"].Value -as [string] + 'mtu' = $pnpWorkbook.Workbook.Names["mgmt_az1_vsan_mtu"].Value -as [string] + 'gateway' = $pnpWorkbook.Workbook.Names["mgmt_az1_vsan_gateway_ip"].Value + 'portGroupKey' = $pnpWorkbook.Workbook.Names["mgmt_az1_vsan_pg"].Value + } + if ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_pg"].Value -ne "Value Missing") { + $networkObject += [pscustomobject]@{ + 'networkType' = "VM_MANAGEMENT" + 'subnet' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_cidr"].Value + 'vlanId' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_vlan"].Value -as [string] + 'mtu' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_mtu"].Value -as [string] + 'gateway' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_gateway_ip"].Value + 'portGroupKey' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_pg"].Value + } + } + + $nsxtManagerObject = @() + $nsxtManagerObject += [pscustomobject]@{ + 'hostname' = $pnpWorkbook.Workbook.Names["mgmt_nsxt_mgra_hostname"].Value + 'ip' = $pnpWorkbook.Workbook.Names["mgmt_nsxt_mgra_ip"].Value + } + if ($singleNSXTManager -eq "N") { + $nsxtManagerObject += [pscustomobject]@{ + 'hostname' = $pnpWorkbook.Workbook.Names["mgmt_nsxt_mgrb_hostname"].Value + 'ip' = $pnpWorkbook.Workbook.Names["mgmt_nsxt_mgrb_ip"].Value + } + $nsxtManagerObject += [pscustomobject]@{ + 'hostname' = $pnpWorkbook.Workbook.Names["mgmt_nsxt_mgrc_hostname"].Value + 'ip' = $pnpWorkbook.Workbook.Names["mgmt_nsxt_mgrc_ip"].Value + } + } + + $vlanTransportZoneObject = @() + $vlanTransportZoneObject += [pscustomobject]@{ + 'zoneName' = $pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value + "-tz-vlan01" + 'networkName' = "netName-vlan" + } + + $overlayTransportZoneObject = @() + $overlayTransportZoneObject += [pscustomobject]@{ + 'zoneName' = $pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value + "-tz-overlay01" + 'networkName' = "netName-overlay" + } + + $edgeNode01interfaces = @() + $edgeNode01interfaces += [pscustomobject]@{ + 'name' = $pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value + "-uplink01-tor1" + 'interfaceCidr' = $pnpWorkbook.Workbook.Names["mgmt_en1_edge_overlay_interface_ip_1_ip"].Value + } + $edgeNode01interfaces += [pscustomobject]@{ + 'name' = $pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value + "-uplink01-tor2" + 'interfaceCidr' = $pnpWorkbook.Workbook.Names["mgmt_en1_edge_overlay_interface_ip_2_ip"].Value + } + + $edgeNode02interfaces = @() + $edgeNode02interfaces += [pscustomobject]@{ + 'name' = $pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value + "-uplink01-tor1" + 'interfaceCidr' = $pnpWorkbook.Workbook.Names["mgmt_en2_edge_overlay_interface_ip_1_ip"].Value + } + $edgeNode02interfaces += [pscustomobject]@{ + 'name' = $pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value + "-uplink01-tor2" + 'interfaceCidr' = $pnpWorkbook.Workbook.Names["mgmt_en2_edge_overlay_interface_ip_2_ip"].Value + + } + + $edgeNodeObject = @() + $edgeNodeObject += [pscustomobject]@{ + 'edgeNodeName' = $pnpWorkbook.Workbook.Names["mgmt_en1_fqdn"].Value.Split(".")[0] + 'edgeNodeHostname' = $pnpWorkbook.Workbook.Names["mgmt_en1_fqdn"].Value + 'managementCidr' = $pnpWorkbook.Workbook.Names["input_mgmt_en1_ip"].Value + "/" + $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_cidr"].Value.Split("/")[-1] + 'edgeVtep1Cidr' = $pnpWorkbook.Workbook.Names["input_mgmt_en1_edge_overlay_interface_ip_1_ip"].Value + "/" + $pnpWorkbook.Workbook.Names["input_mgmt_edge_overlay_cidr"].Value.Split("/")[-1] + 'edgeVtep2Cidr' = $pnpWorkbook.Workbook.Names["input_mgmt_en1_edge_overlay_interface_ip_2_ip"].Value + "/" + $pnpWorkbook.Workbook.Names["input_mgmt_edge_overlay_cidr"].Value.Split("/")[-1] + interfaces = $edgeNode01interfaces + } + $edgeNodeObject += [pscustomobject]@{ + 'edgeNodeName' = $pnpWorkbook.Workbook.Names["mgmt_en2_fqdn"].Value.Split(".")[0] + 'edgeNodeHostname' = $pnpWorkbook.Workbook.Names["mgmt_en2_fqdn"].Value + 'managementCidr' = $pnpWorkbook.Workbook.Names["input_mgmt_en2_ip"].Value + "/" + $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_cidr"].Value.Split("/")[-1] + 'edgeVtep1Cidr' = $pnpWorkbook.Workbook.Names["input_mgmt_en2_edge_overlay_interface_ip_1_ip"].Value + "/" + $pnpWorkbook.Workbook.Names["input_mgmt_edge_overlay_cidr"].Value.Split("/")[-1] + 'edgeVtep2Cidr' = $pnpWorkbook.Workbook.Names["input_mgmt_en2_edge_overlay_interface_ip_2_ip"].Value + "/" + $pnpWorkbook.Workbook.Names["input_mgmt_edge_overlay_cidr"].Value.Split("/")[-1] + interfaces = $edgeNode02interfaces + } + + $edgeServicesObject = @() + $edgeServicesObject += [pscustomobject]@{ + 'tier0GatewayName' = $pnpWorkbook.Workbook.Names["mgmt_tier0_name"].Value + 'tier1GatewayName' = $pnpWorkbook.Workbook.Names["mgmt_tier1_name"].Value + } + + $bgpNeighboursObject = @() + $bgpNeighboursObject += [pscustomobject]@{ + 'neighbourIp' = $pnpWorkbook.Workbook.Names["input_mgmt_az1_tor1_peer_ip"].Value + 'autonomousSystem' = $pnpWorkbook.Workbook.Names["input_mgmt_az1_tor1_peer_asn"].Value + 'password' = $pnpWorkbook.Workbook.Names["input_mgmt_az1_tor1_peer_bgp_password"].Value + } + $bgpNeighboursObject += [pscustomobject]@{ + 'neighbourIp' = $pnpWorkbook.Workbook.Names["input_mgmt_az1_tor2_peer_ip"].Value + 'autonomousSystem' = $pnpWorkbook.Workbook.Names["input_mgmt_az1_tor2_peer_asn"].Value + 'password' = $pnpWorkbook.Workbook.Names["input_mgmt_az1_tor2_peer_bgp_password"].Value + } + + $nsxtEdgeObject = @() + $nsxtEdgeObject += [pscustomobject]@{ + 'edgeClusterName' = $pnpWorkbook.Workbook.Names["mgmt_ec_name"].Value + 'edgeRootPassword' = $pnpWorkbook.Workbook.Names["nsxt_en_root_password"].Value + 'edgeAdminPassword' = $pnpWorkbook.Workbook.Names["nsxt_en_admin_password"].Value + 'edgeAuditPassword' = $pnpWorkbook.Workbook.Names["nsxt_en_audit_password"].Value + 'edgeFormFactor' = $pnpWorkbook.Workbook.Names["mgmt_ec_formfactor"].Value + 'tier0ServicesHighAvailability' = "ACTIVE_ACTIVE" + 'asn' = $pnpWorkbook.Workbook.Names["mgmt_en_asn"].Value + edgeServicesSpecs = ($edgeServicesObject | Select-Object -Skip 0) + edgeNodeSpecs = $edgeNodeObject + bgpNeighbours = $bgpNeighboursObject + } + + $logicalSegmentsObject = @() + $logicalSegmentsObject += [pscustomobject]@{ + 'name' = $pnpWorkbook.Workbook.Names["reg_seg01_name"].Value + 'networkType' = "REGION_SPECIFIC" + } + $logicalSegmentsObject += [pscustomobject]@{ + 'name' = $pnpWorkbook.Workbook.Names["xreg_seg01_name"].Value + 'networkType' = "X_REGION" + } + + $nsxtObject = @() + $nsxtObject += [pscustomobject]@{ + 'nsxtManagerSize' = $pnpWorkbook.Workbook.Names["mgmt_nsxt_mgr_formfactor"].Value.tolower() + nsxtManagers = $nsxtManagerObject + 'rootNsxtManagerPassword' = $pnpWorkbook.Workbook.Names["nsxt_lm_root_password"].Value + 'nsxtAdminPassword' = $pnpWorkbook.Workbook.Names["nsxt_lm_admin_password"].Value + 'nsxtAuditPassword' = $pnpWorkbook.Workbook.Names["nsxt_lm_audit_password"].Value + 'rootLoginEnabledForNsxtManager' = "true" + 'sshEnabledForNsxtManager' = "true" + overLayTransportZone = ($overlayTransportZoneObject | Select-Object -Skip 0) + vlanTransportZone = ($vlanTransportZoneObject | Select-Object -Skip 0) + 'vip' = $pnpWorkbook.Workbook.Names["mgmt_nsxt_vip_ip"].Value + 'vipFqdn' = $pnpWorkbook.Workbook.Names["mgmt_nsxt_hostname"].Value + 'nsxtLicense' = $nsxtLicense + 'transportVlanId' = $pnpWorkbook.Workbook.Names["mgmt_az1_host_overlay_vlan"].Value -as [int] + } + + $excelvsanDedup = $pnpWorkbook.Workbook.Names["mgmt_vsan_dedup"].Value + if ($excelvsanDedup -eq "No") { + $vsanDedup = $false + } elseif ($excelvsanDedup -eq "Yes") { + $vsanDedup = $true + } + + if ($pnpWorkbook.Workbook.Names["mgmt_principal_storage_chosen"].Value -eq "vSAN-ESA") { + $ESAenabledtrueobject = @() + $ESAenabledtrueobject += [pscustomobject]@{ + 'enabled' = "true" + } + } else { + $ESAenabledtrueobject = @() + $ESAenabledtrueobject += [pscustomobject]@{ + 'enabled' = "false" + } + } + + $vsanObject = @() + if ($pnpWorkbook.Workbook.Names["mgmt_principal_storage_chosen"].Value -eq "vSAN-ESA") { + $vsanObject += [pscustomobject]@{ + 'vsanName' = "vsan-1" + 'licenseFile' = $vsanLicense + 'vsanDedup' = $vsanDedup + 'datastoreName' = $pnpWorkbook.Workbook.Names["mgmt_vsan_datastore"].Value + esaConfig = ($ESAenabledtrueobject | Select-Object -Skip 0) + } + } else { + $vsanObject += [pscustomobject]@{ + 'vsanName' = "vsan-1" + 'licenseFile' = $vsanLicense + 'vsanDedup' = $vsanDedup + 'datastoreName' = $pnpWorkbook.Workbook.Names["mgmt_vsan_datastore"].Value + } + } + $niocObject = @() + $niocObject += [pscustomobject]@{ + 'trafficType' = "VSAN" + 'value' = "HIGH" + } + $niocObject += [pscustomobject]@{ + 'trafficType' = "VMOTION" + 'value' = "LOW" + } + $niocObject += [pscustomobject]@{ + 'trafficType' = "VDP" + 'value' = "LOW" + } + $niocObject += [pscustomobject]@{ + 'trafficType' = "VIRTUALMACHINE" + 'value' = "HIGH" + } + $niocObject += [pscustomobject]@{ + 'trafficType' = "MANAGEMENT" + 'value' = "NORMAL" + } + $niocObject += [pscustomobject]@{ + 'trafficType' = "NFS" + 'value' = "LOW" + } + $niocObject += [pscustomobject]@{ + 'trafficType' = "HBR" + 'value' = "LOW" + } + $niocObject += [pscustomobject]@{ + 'trafficType' = "FAULTTOLERANCE" + 'value' = "LOW" + } + $niocObject += [pscustomobject]@{ + 'trafficType' = "ISCSI" + 'value' = "LOW" + } + + $dvsObject = @() + $dvsObject += [pscustomobject]@{ + 'mtu' = $dvsMtu + niocSpecs = $niocObject + 'dvsName' = $pnpWorkbook.Workbook.Names["primary_vds_name"].Value + 'vmnics' = $vmnics + 'networks' = $networks + } + + $vmFolderObject = @() + $vmFOlderObject += [pscustomobject]@{ + 'MANAGEMENT' = $pnpWorkbook.Workbook.Names["mgmt_mgmt_vm_folder"].Value + 'NETWORKING' = $pnpWorkbook.Workbook.Names["mgmt_nsx_vm_folder"].Value + 'EDGENODES' = $pnpWorkbook.Workbook.Names["mgmt_edge_vm_folder"].Value + } + + if (($pnpWorkbook.Workbook.Names["mgmt_evc_mode"].Value -eq "n/a") -or ($pnpWorkbook.Workbook.Names["mgmt_evc_mode"].Value -eq $null)) { + $evcMode = "" + } else { + $evcMode = $pnpWorkbook.Workbook.Names["mgmt_evc_mode"].Value + } + + $resourcePoolObject = @() + $resourcePoolObject += [pscustomobject]@{ + 'type' = "management" + 'name' = $pnpWorkbook.Workbook.Names["mgmt_mgmt_rp"].Value + 'cpuSharesLevel' = "high" + 'cpuSharesValue' = "0" -as [int] + 'cpuLimit' = "-1" -as [int] + 'cpuReservationExpandable' = $true + 'cpuReservationPercentage' = "0" -as [int] + 'memorySharesLevel' = "normal" + 'memorySharesValue' = "0" -as [int] + 'memoryLimit' = "-1" -as [int] + 'memoryReservationExpandable' = $true + 'memoryReservationPercentage' = "0" -as [int] + } + $resourcePoolObject += [pscustomobject]@{ + 'type' = "network" + 'name' = $pnpWorkbook.Workbook.Names["mgmt_nsx_rp"].Value + 'cpuSharesLevel' = "high" + 'cpuSharesValue' = "0" -as [int] + 'cpuLimit' = "-1" -as [int] + 'cpuReservationExpandable' = $true + 'cpuReservationPercentage' = "0" -as [int] + 'memorySharesLevel' = "normal" + 'memorySharesValue' = "0" -as [int] + 'memoryLimit' = "-1" -as [int] + 'memoryReservationExpandable' = $true + 'memoryReservationPercentage' = "0" -as [int] + } + $resourcePoolObject += [pscustomobject]@{ + 'type' = "compute" + 'name' = $pnpWorkbook.Workbook.Names["mgmt_user_edge_rp"].Value + 'cpuSharesLevel' = "normal" + 'cpuSharesValue' = "0" -as [int] + 'cpuLimit' = "-1" -as [int] + 'cpuReservationExpandable' = $true + 'cpuReservationPercentage' = "0" -as [int] + 'memorySharesLevel' = "normal" + 'memorySharesValue' = "0" -as [int] + 'memoryLimit' = "-1" -as [int] + 'memoryReservationExpandable' = $true + 'memoryReservationPercentage' = "0" -as [int] + } + $resourcePoolObject += [pscustomobject]@{ + 'type' = "compute" + 'name' = $pnpWorkbook.Workbook.Names["mgmt_user_vm_rp"].Value + 'cpuSharesLevel' = "normal" + 'cpuSharesValue' = "0" -as [int] + 'cpuLimit' = "-1" -as [int] + 'cpuReservationExpandable' = $true + 'cpuReservationPercentage' = "0" -as [int] + 'memorySharesLevel' = "normal" + 'memorySharesValue' = "0" -as [int] + 'memoryLimit' = "-1" -as [int] + 'memoryReservationExpandable' = $true + 'memoryReservationPercentage' = "0" -as [int] + } + + if ($pnpWorkbook.Workbook.Names["mgmt_consolidated_result"].Value -eq "Included") { + $clusterObject = @() + $clusterObject += [pscustomobject]@{ + vmFolders = ($vmFolderObject | Select-Object -Skip 0) + 'clusterName' = $pnpWorkbook.Workbook.Names["mgmt_cluster"].Value + 'clusterEvcMode' = $evcMode + resourcePoolSpecs = $resourcePoolObject + } + } else { + $clusterObject = @() + $clusterObject += [pscustomobject]@{ + vmFolders = ($vmFolderObject | Select-Object -Skip 0) + 'clusterName' = $pnpWorkbook.Workbook.Names["mgmt_cluster"].Value + 'clusterEvcMode' = $evcMode + } + } + + $ssoObject = @() + $ssoObject += [pscustomobject]@{ + 'ssoDomain' = 'vsphere.local' + } + + $pscObject = @() + $pscObject += [pscustomobject]@{ + pscSsoSpec = ($ssoObject | Select-Object -Skip 0) + 'adminUserSsoPassword' = $pnpWorkbook.Workbook.Names["administrator_vsphere_local_password"].Value + } + + $vcenterObject = @() + $vcenterObject += [pscustomobject]@{ + 'vcenterIp' = $pnpWorkbook.Workbook.Names["mgmt_vc_ip"].Value + 'vcenterHostname' = $pnpWorkbook.Workbook.Names["mgmt_vc_hostname"].Value + 'licenseFile' = $vcenterLicense + 'rootVcenterPassword' = $pnpWorkbook.Workbook.Names["vcenter_root_password"].Value + 'vmSize' = $pnpWorkbook.Workbook.Names["mgmt_vc_size"].Value.tolower() + } + + $hostCredentialsObject = @() + $hostCredentialsObject += [pscustomobject]@{ + 'username' = 'root' + 'password' = $pnpWorkbook.Workbook.Names["esxi_root_password"].Value + } + + $ipAddressPrivate01Object = @() + $ipAddressPrivate01Object += [pscustomobject]@{ + 'subnet' = $esxManagmentMaskObject.IPAddressToString + 'ipAddress' = $pnpWorkbook.Workbook.Names["mgmt_az1_host1_mgmt_ip"].Value + 'gateway' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_gateway_ip"].Value + } + + $ipAddressPrivate02Object = @() + $ipAddressPrivate02Object += [pscustomobject]@{ + 'subnet' = $esxManagmentMaskObject.IPAddressToString + 'ipAddress' = $pnpWorkbook.Workbook.Names["mgmt_az1_host2_mgmt_ip"].Value + 'gateway' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_gateway_ip"].Value + } + + $ipAddressPrivate03Object = @() + $ipAddressPrivate03Object += [pscustomobject]@{ + 'subnet' = $esxManagmentMaskObject.IPAddressToString + 'ipAddress' = $pnpWorkbook.Workbook.Names["mgmt_az1_host3_mgmt_ip"].Value + 'gateway' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_gateway_ip"].Value + } + + $ipAddressPrivate04Object = @() + $ipAddressPrivate04Object += [pscustomobject]@{ + 'subnet' = $esxManagmentMaskObject.IPAddressToString + 'ipAddress' = $pnpWorkbook.Workbook.Names["mgmt_az1_host4_mgmt_ip"].Value + 'gateway' = $pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_gateway_ip"].Value + } + + $HostObject = @() + $HostObject += [pscustomobject]@{ + 'hostname' = $pnpWorkbook.Workbook.Names["mgmt_az1_host1_hostname"].Value + 'vSwitch' = $pnpWorkbook.Workbook.Names["mgmt_vss_switch"].Value + 'association' = $pnpWorkbook.Workbook.Names["mgmt_datacenter"].Value + credentials = ($hostCredentialsObject | Select-Object -Skip 0) + ipAddressPrivate = ($ipAddressPrivate01Object | Select-Object -Skip 0) + } + $HostObject += [pscustomobject]@{ + 'hostname' = $pnpWorkbook.Workbook.Names["mgmt_az1_host2_hostname"].Value + 'vSwitch' = $pnpWorkbook.Workbook.Names["mgmt_vss_switch"].Value + 'association' = $pnpWorkbook.Workbook.Names["mgmt_datacenter"].Value + credentials = ($hostCredentialsObject | Select-Object -Skip 0) + ipAddressPrivate = ($ipAddressPrivate02Object | Select-Object -Skip 0) + } + $HostObject += [pscustomobject]@{ + 'hostname' = $pnpWorkbook.Workbook.Names["mgmt_az1_host3_hostname"].Value + 'vSwitch' = $pnpWorkbook.Workbook.Names["mgmt_vss_switch"].Value + 'association' = $pnpWorkbook.Workbook.Names["mgmt_datacenter"].Value + credentials = ($hostCredentialsObject | Select-Object -Skip 0) + ipAddressPrivate = ($ipAddressPrivate03Object | Select-Object -Skip 0) + } + $HostObject += [pscustomobject]@{ + 'hostname' = $pnpWorkbook.Workbook.Names["mgmt_az1_host4_hostname"].Value + 'vSwitch' = $pnpWorkbook.Workbook.Names["mgmt_vss_switch"].Value + 'association' = $pnpWorkbook.Workbook.Names["mgmt_datacenter"].Value + credentials = ($hostCredentialsObject | Select-Object -Skip 0) + ipAddressPrivate = ($ipAddressPrivate04Object | Select-Object -Skip 0) + } + + $excluded = New-Object System.Collections.ArrayList + [Array]$excluded = "NSX-V" + + $ceipState = $pnpWorkbook.Workbook.Names["mgmt_ceip_status"].Value + if ($ceipState -eq "Yes") { + $ceipEnabled = "$true" + } else { + $ceipEnabled = "$false" + } + + $fipsState = $pnpWorkbook.Workbook.Names["mgmt_fips_status"].Value + if ($fipsState -eq "Yes") { + $fipsEnabled = "$true" + } else { + $fipsEnabled = "$false" + } + + $managementDomainObject = New-Object -TypeName psobject + $managementDomainObject | Add-Member -notepropertyname 'taskName' -notepropertyvalue "workflowconfig/workflowspec-ems.json" + $managementDomainObject | Add-Member -notepropertyname 'sddcId' -notepropertyvalue $pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value + $managementDomainObject | Add-Member -notepropertyname 'ceipEnabled' -notepropertyvalue $ceipEnabled + $managementDomainObject | Add-Member -notepropertyname 'fipsEnabled' -notepropertyvalue $fipsEnabled + $managementDomainObject | Add-Member -notepropertyname 'managementPoolName' -notepropertyvalue $pnpWorkbook.Workbook.Names["mgmt_az1_pool_name"].Value + $managementDomainObject | Add-Member -notepropertyname 'skipEsxThumbprintValidation' -notepropertyvalue $true + $managementDomainObject | Add-Member -notepropertyname 'esxLicense' -notepropertyvalue $esxLicense + $managementDomainObject | Add-Member -notepropertyname 'excludedComponents' -notepropertyvalue $excluded + $managementDomainObject | Add-Member -notepropertyname 'ntpServers' -notepropertyvalue $ntpServers + $managementDomainObject | Add-Member -notepropertyname 'dnsSpec' -notepropertyvalue ($dnsObject | Select-Object -Skip 0) + $managementDomainObject | Add-Member -notepropertyname 'sddcManagerSpec' -notepropertyvalue ($sddcManagerObject | Select-Object -Skip 0) + $managementDomainObject | Add-Member -notepropertyname 'networkSpecs' -notepropertyvalue $networkObject + $managementDomainObject | Add-Member -notepropertyname 'nsxtSpec' -notepropertyvalue ($nsxtObject | Select-Object -Skip 0) + $managementDomainObject | Add-Member -notepropertyname 'vsanSpec' -notepropertyvalue ($vsanObject | Select-Object -Skip 0) + $managementDomainObject | Add-Member -notepropertyname 'dvsSpecs' -notepropertyvalue $dvsObject + $managementDomainObject | Add-Member -notepropertyname 'clusterSpec' -notepropertyvalue ($clusterObject | Select-Object -Skip 0) + $managementDomainObject | Add-Member -notepropertyname 'pscSpecs' -notepropertyvalue $pscObject + $managementDomainObject | Add-Member -notepropertyname 'vcenterSpec' -notepropertyvalue ($vcenterObject | Select-Object -Skip 0) + $managementDomainObject | Add-Member -notepropertyname 'hostSpecs' -notepropertyvalue $hostObject + if ($pnpWorkbook.Workbook.Names["vcf_version"].Value -gt "v5.0.x") { + if ($pnpWorkbook.Workbook.Names["vcf_plus_chosen"].Value -eq "Included") { + $managementDomainObject | Add-Member -notepropertyname 'subscriptionLicensing' -notepropertyvalue "True" + } else { + $managementDomainObject | Add-Member -notepropertyname 'subscriptionLicensing' -notepropertyvalue "False" + } + } + + Write-Output "Exporting the $module to $($path)$($pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value)-domainSpec.json" + $managementDomainObject | ConvertTo-Json -Depth 12 | Out-File -Encoding UTF8 -FilePath $jsonPath"$($pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value)-domainSpec.json" + Write-Output "Closing the Excel Workbook: $workbook" + Close-ExcelPackage $pnpWorkbook -NoSave -ErrorAction SilentlyContinue + Write-Output "Completed the Process of Generating the $module" + } Catch { + ResponseException -object $_ + } +} +Export-ModuleMember -Function Export-VCFManagementDomainJsonSpec +#EndRegion JSON Export Functions diff --git a/docs/documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md b/docs/documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md new file mode 100644 index 000000000..3e39936cd --- /dev/null +++ b/docs/documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md @@ -0,0 +1,63 @@ +# Export-VCFManagementDomainJsonSpec + +## Synopsis + +Generates a JSON file from the VMware Cloud Foundation Planning & Preparation Workbook to perform a VCF bringup. Requires the installation of ImportExcel Powershell module. + +## Syntax + +```powershell +Export-VCFManagementDomainJsonSpec [[-workbook] ] [[-jsonPath] ] [] +``` + +## Description + +The `Export-VCFManagementDomainJsonSpec` cmdlet Generates a JSON file from the VCF Planning & Preparation Workbook to perform a VCF bringup. + +## Examples + +### Example 1 + +```powershell +Export-VCFManagementDomainJsonSpec -workbook vcf-pnp.xlsx -jsonPath ./ +``` + +This example will open the Planning & Preparation workbook and extract the required data to create a bringup JSON. + +## Parameters + +### -workbook + +Specifies the path to the Planning & Preparation Excel workbook. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -jsonPath + +Specifies the output path for the json file. JSON file name will be 'management_domain_name-domainSpec.json' + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### Common Parameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/mkdocs.yml b/mkdocs.yml index 96ef2701c..8deac3278 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -223,6 +223,8 @@ nav: - documentation/functions/idp/New-VCFIdentityProvider.md - documentation/functions/idp/Remove-VCFIdentityProvider.md - documentation/functions/idp/Update-VCFIdentityProvider.md + - JSON Export: + - documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md - Licenses: - documentation/functions/licenses/Get-VCFLicenseKey.md - documentation/functions/licenses/Get-VCFLicenseMode.md From 1c68d41b51ac93cfa8736158a65f906841446297 Mon Sep 17 00:00:00 2001 From: Nathan Thaler Date: Mon, 26 Feb 2024 09:47:59 -0500 Subject: [PATCH 14/33] chore: fix typos in error messages (#274) Correct seven instances of the typo "commpleted" (rather than "completed"). Signed-off-by: Nathan Thaler --- PowerVCF.psd1 | 6 +++--- PowerVCF.psm1 | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index d0a396536..d31fa0723 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -3,15 +3,15 @@ # Module manifest for module 'PowerVCF' # Generated by: Broadcom -# Generated on: 2024-02-21 +# Generated on: 2024-02-26 @{ # Script module or binary module file associated with this manifest. -RootModule = 'PowerVCF.psm1' +RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1007' +ModuleVersion = '2.5.0.1008' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index 7ad69739f..fcf0d41e6 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -1177,7 +1177,7 @@ Function New-VCFCluster { ResponseException -object $_ } } else { - Write-Error "The validation task commpleted the run with the following problems: $($response.validationChecks.errorResponse.message)" + Write-Error "The validation task completed the run with the following problems: $($response.validationChecks.errorResponse.message)" } } Catch { ResponseException -object $_ @@ -1244,7 +1244,7 @@ Function Set-VCFCluster { ResponseException -object $_ } } else { - Write-Error "The validation task commpleted the run with the following problems: $($response.validationChecks.errorResponse.message)" + Write-Error "The validation task completed the run with the following problems: $($response.validationChecks.errorResponse.message)" } if ($PsBoundParameters.ContainsKey("markForDeletion") -and ($PsBoundParameters.ContainsKey("id"))) { @@ -1955,7 +1955,7 @@ Function New-VCFWorkloadDomain { $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody Return $response } else { - Write-Error "The validation task commpleted the run with the following problems:" + Write-Error "The validation task completed the run with the following problems:" Write-Output $response.validationChecks.errorResponse.message } } elseif ($PsBoundParameters.ContainsKey("validate")) { @@ -2612,7 +2612,7 @@ Function New-VCFCommissionedHost { $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody Return $response } else { - Write-Error "The validation task commpleted the run with the following problems:" + Write-Error "The validation task completed the run with the following problems:" Write-Output $response.validationChecks.errorResponse } } elseif ($PsBoundParameters.ContainsKey("validate")) { @@ -2627,7 +2627,7 @@ Function New-VCFCommissionedHost { Write-Output "Task validation completed successfully." Return $response } else { - Write-Error "The validation task commpleted the run with the following problems:" + Write-Error "The validation task completed the run with the following problems:" Write-Output $response.validationChecks.errorResponse } } @@ -3253,7 +3253,7 @@ Function New-VCFEdgeCluster { $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody Return $response } else { - Write-Error "The validation task commpleted the run with the following error: $($response.validationChecks.errorResponse.message)" + Write-Error "The validation task completed the run with the following error: $($response.validationChecks.errorResponse.message)" } } elseif ($PsBoundParameters.ContainsKey("validate")) { $response = Validate-EdgeClusterSpec -json $jsonBody # Validate the JSON specification file. @@ -3267,7 +3267,7 @@ Function New-VCFEdgeCluster { Write-Output "Task validation completed successfully." Return $response } else { - Write-Error "The validation task commpleted the run with the following errors: $($response.validationChecks.errorResponse.message)" + Write-Error "The validation task completed the run with the following errors: $($response.validationChecks.errorResponse.message)" } } } Catch { From 0d6748ce1798cf39687aea0fcafa3bdf04c0487e Mon Sep 17 00:00:00 2001 From: Gary Blake <31245616+GaryJBlake@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:54:07 +0000 Subject: [PATCH 15/33] feat: enhance Export-VCFManagementDomainJsonSpec (#278) - Added synopsis, description, example and parameters to function. Signed-off-by: Gary Blake --- PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 32 ++++++++++++++++--- .../Export-VCFManagementDomainJsonSpec.md | 2 +- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index d31fa0723..e5c1dbd70 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1008' +ModuleVersion = '2.5.0.1009' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index fcf0d41e6..e27a1fddb 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -6330,24 +6330,45 @@ Export-ModuleMember -Function Debug-CatchWriter #Region JSON Export Functions + Function Export-VCFManagementDomainJsonSpec { + <# + .SYNOPSIS + Generates a JSON file from the VMware Cloud Foundation Planning & Preparation Workbook to perform a VMware Cloud + Foundation Bring-up. Requires the installation of the ImportExcel Powershell module. + + .DESCRIPTION + The Export-VCFManagementDomainJsonSpec cmdlet creates the JSON specification file using the Planning and Preparation workbook + to deploy a management domain. + + .EXAMPLE + Export-VCFManagementDomainJsonSpec -workbook .\pnp-workbook.xlsx -jsonPath .\domainSpec.json + This example creates a JSON deployment specification for a Management Domain using the Planning and Preparation Workbook. + + .PARAMETER workbook + The path to the Planning and Preparation Workbook (.xlsx) file. + + .PARAMETER jsonFile + The fully qualified path to the JSON specification file. + #> Param ( [Parameter (Mandatory = $true)] [String]$workbook, [Parameter (Mandatory = $true)] [String]$jsonPath ) + # Confirm the presence of ImportExcel module - if (!(Get-InstalledModule -name "ImportExcel" -MinimumVersion 7.8.5 -ErrorAction SilentlyContinue)) { - Write-Host " ImportExcel PowerShell module not found. Please install manually" -ForegroundColor Yellow + if (!(Get-InstalledModule -name "ImportExcel" -MinimumVersion 7.8.5 -ErrorAction SilentlyContinue)) { + Write-Error "ImportExcel PowerShell Module Not Found. Please Install Manually" } else { - Write-Output " ImportExcel PowerShell module found" -ForegroundColor Green + Write-Output "ImportExcel PowerShell Module Found" } $Global:vcfVersion = @("v4.3.x", "v4.4.x", "v4.5.x", "v5.0.x", "v5.1.x") Try { - $module = "Management Domain JSON Spec" Write-Output "Starting the Process of Generating the $module" + Write-Output "Opening the Excel Workbook: $workbook" $pnpWorkbook = Open-ExcelPackage -Path $Workbook if ($pnpWorkbook.Workbook.Names["vcf_version"].Value -notin $vcfVersion) { @@ -6923,4 +6944,5 @@ Function Export-VCFManagementDomainJsonSpec { } } Export-ModuleMember -Function Export-VCFManagementDomainJsonSpec -#EndRegion JSON Export Functions + +#EndRegion JSON Export Functions \ No newline at end of file diff --git a/docs/documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md b/docs/documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md index 3e39936cd..4a401d815 100644 --- a/docs/documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md +++ b/docs/documentation/functions/json-export/Export-VCFManagementDomainJsonSpec.md @@ -2,7 +2,7 @@ ## Synopsis -Generates a JSON file from the VMware Cloud Foundation Planning & Preparation Workbook to perform a VCF bringup. Requires the installation of ImportExcel Powershell module. +Generates a JSON file from the VMware Cloud Foundation Planning & Preparation Workbook to perform a VMware Cloud Foundation Bring-up. Requires the installation of the ImportExcel Powershell module. ## Syntax From a69b4335f029f7e33cf33a79091a691ab66cb170 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 22:30:05 -0400 Subject: [PATCH 16/33] chore(deps): bump actions/setup-python from 5.0.0 to 5.1.0 (#279) --- .github/workflows/docs.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 53efe0078..e622db556 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: python-version: 3.x - name: Install Dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 781263a89..2da0964a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,7 +136,7 @@ jobs: ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: python-version: 3.x - name: Install Dependencies From 1c3931acfb9d738afe28a5ec5ef04f782fff8af8 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Wed, 3 Jul 2024 09:12:12 -0400 Subject: [PATCH 17/33] fix: update exceptions in `Get-VcfTask` (#281) --- CHANGELOG.md | 1 + PowerVCF.psd1 | 4 ++-- PowerVCF.psm1 | 50 +++++++++++++++++++++++++------------------------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fcf35fa8..627295dc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ > Released: Unreleased +- Updated `Get-VCFTask` cmdlet with additional exception message to catch. - Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`. - Updated `Get-VCFPersonality` cmdlet with optional parameter `name`. - Updated `New-VCFWorkloadDomain` cmdlet with optional parameter `validate` to validate the JSON specification. diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index e5c1dbd70..d68ce0f0a 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -3,7 +3,7 @@ # Module manifest for module 'PowerVCF' # Generated by: Broadcom -# Generated on: 2024-02-26 +# Generated on: 2024-07-02 @{ @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. -ModuleVersion = '2.5.0.1009' +ModuleVersion = '2.5.0.1010' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index e27a1fddb..b663fb620 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -2567,11 +2567,11 @@ Function New-VCFCommissionedHost { $json_content = $json $json_content = $json_content | ConvertFrom-Json - + # If the sample JSON payload from the SDDC Manager UO is used, transform to API specification. if ($json.contains("hostfqdn")) { $newjson_content = @() - foreach ($jsoninfo in $json_content.hostsSpec) { + foreach ($jsoninfo in $json_content.hostsSpec) { $fqdn = $jsoninfo.hostfqdn $networkPoolName = $jsoninfo.networkPoolName $password = $jsoninfo.password @@ -2586,14 +2586,14 @@ Function New-VCFCommissionedHost { 'storageType' = $storageType 'username' = $username } - } - $jsonvalidation = ConvertTo-Json @($newjson_content) + } + $jsonvalidation = ConvertTo-Json @($newjson_content) $jsonBody = validateJsonInput -json $jsonvalidation } else { # If the JSON payload is already in the API specification, validate. - $jsonBody = validateJsonInput -json $json + $jsonBody = validateJsonInput -json $json } - + Try { createHeader # Set the Accept and Authorization headers. checkVCFToken # Validate the access token and refresh, if necessary. @@ -2627,7 +2627,7 @@ Function New-VCFCommissionedHost { Write-Output "Task validation completed successfully." Return $response } else { - Write-Error "The validation task completed the run with the following problems:" + Write-Error "The validation task completed the run with the following problems:" Write-Output $response.validationChecks.errorResponse } } @@ -3323,7 +3323,7 @@ Function Get-VCFPersonality { $uri = "https://$sddcManager/v1/personalities/$id" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers $response - } + } if ($PsBoundParameters.ContainsKey("name")) { $uri = "https://$sddcManager/v1/personalities?personalityName=$name" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers @@ -3332,8 +3332,8 @@ Function Get-VCFPersonality { $response } else { $response.elements - } - } + } + } } Catch { ResponseException -object $_ } @@ -4325,7 +4325,7 @@ Function Get-VCFSystemPrecheckTask { .PARAMETER failureOnly Specifies to return only the failed subtasks. - + #> Param ( @@ -4337,13 +4337,13 @@ Function Get-VCFSystemPrecheckTask { createHeader # Set the Accept and Authorization headers. checkVCFToken # Validate the access token and refresh, if necessary. $uri = "https://$sddcManager/v1/system/prechecks/tasks/$id" - + Do { # Keep checking until status is not IN_PROGRESS $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers -ContentType 'application/json' Start-Sleep -Seconds 2 } While ($response.status -eq "IN_PROGRESS") - + if ($response.status -eq "FAILED" -and $PsBoundParameters.ContainsKey("failureOnly")) { $failed_task = $response.subTasks | Where-Object { $_.status -eq "FAILED" } $failed_subtask = $failed_task.stages | Where-Object { $_.status -eq "FAILED" } @@ -4351,7 +4351,7 @@ Function Get-VCFSystemPrecheckTask { } else { $response } - + } Catch { ResponseException -object $_ } @@ -4408,7 +4408,7 @@ Function Get-VCFTask { Try { $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers } Catch { - if ($_.Exception.Message -eq "The remote server returned an error: (404) Not Found.") { + if ($_.Exception.Message -eq "The remote server returned an error: (404) Not Found." -or $_.Exception.Message -eq "Response status code does not indicate success: 404 ().") { Write-Error "Task with ID $id not found." } else { ResponseException -object $_ @@ -6394,9 +6394,9 @@ Function Export-VCFManagementDomainJsonSpec { $vmMgmtCidr = ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_cidr"].Value.split("/"))[1] } else { $esxMgmtCidr = ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_cidr"].Value.split("/"))[1] - $vmMgmtCidr = ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_cidr"].Value.split("/"))[1] + $vmMgmtCidr = ($pnpWorkbook.Workbook.Names["mgmt_az1_mgmt_vm_cidr"].Value.split("/"))[1] } - + $esxManagmentMaskObject = ([IPAddress] ([Convert]::ToUInt64((("1" * $esxMgmtCidr) + ("0" * (32 - $esxMgmtCidr))), 2))) $vmManagmentMaskObject = ([IPAddress] ([Convert]::ToUInt64((("1" * $vmMgmtCidr) + ("0" * (32 - $vmMgmtCidr))), 2))) @@ -6556,7 +6556,7 @@ Function Export-VCFManagementDomainJsonSpec { 'interfaceCidr' = $pnpWorkbook.Workbook.Names["mgmt_en2_edge_overlay_interface_ip_2_ip"].Value } - + $edgeNodeObject = @() $edgeNodeObject += [pscustomobject]@{ 'edgeNodeName' = $pnpWorkbook.Workbook.Names["mgmt_en1_fqdn"].Value.Split(".")[0] @@ -6565,7 +6565,7 @@ Function Export-VCFManagementDomainJsonSpec { 'edgeVtep1Cidr' = $pnpWorkbook.Workbook.Names["input_mgmt_en1_edge_overlay_interface_ip_1_ip"].Value + "/" + $pnpWorkbook.Workbook.Names["input_mgmt_edge_overlay_cidr"].Value.Split("/")[-1] 'edgeVtep2Cidr' = $pnpWorkbook.Workbook.Names["input_mgmt_en1_edge_overlay_interface_ip_2_ip"].Value + "/" + $pnpWorkbook.Workbook.Names["input_mgmt_edge_overlay_cidr"].Value.Split("/")[-1] interfaces = $edgeNode01interfaces - } + } $edgeNodeObject += [pscustomobject]@{ 'edgeNodeName' = $pnpWorkbook.Workbook.Names["mgmt_en2_fqdn"].Value.Split(".")[0] 'edgeNodeHostname' = $pnpWorkbook.Workbook.Names["mgmt_en2_fqdn"].Value @@ -6574,7 +6574,7 @@ Function Export-VCFManagementDomainJsonSpec { 'edgeVtep2Cidr' = $pnpWorkbook.Workbook.Names["input_mgmt_en2_edge_overlay_interface_ip_2_ip"].Value + "/" + $pnpWorkbook.Workbook.Names["input_mgmt_edge_overlay_cidr"].Value.Split("/")[-1] interfaces = $edgeNode02interfaces } - + $edgeServicesObject = @() $edgeServicesObject += [pscustomobject]@{ 'tier0GatewayName' = $pnpWorkbook.Workbook.Names["mgmt_tier0_name"].Value @@ -6599,14 +6599,14 @@ Function Export-VCFManagementDomainJsonSpec { 'edgeRootPassword' = $pnpWorkbook.Workbook.Names["nsxt_en_root_password"].Value 'edgeAdminPassword' = $pnpWorkbook.Workbook.Names["nsxt_en_admin_password"].Value 'edgeAuditPassword' = $pnpWorkbook.Workbook.Names["nsxt_en_audit_password"].Value - 'edgeFormFactor' = $pnpWorkbook.Workbook.Names["mgmt_ec_formfactor"].Value + 'edgeFormFactor' = $pnpWorkbook.Workbook.Names["mgmt_ec_formfactor"].Value 'tier0ServicesHighAvailability' = "ACTIVE_ACTIVE" 'asn' = $pnpWorkbook.Workbook.Names["mgmt_en_asn"].Value edgeServicesSpecs = ($edgeServicesObject | Select-Object -Skip 0) edgeNodeSpecs = $edgeNodeObject bgpNeighbours = $bgpNeighboursObject } - + $logicalSegmentsObject = @() $logicalSegmentsObject += [pscustomobject]@{ 'name' = $pnpWorkbook.Workbook.Names["reg_seg01_name"].Value @@ -6650,7 +6650,7 @@ Function Export-VCFManagementDomainJsonSpec { $ESAenabledtrueobject = @() $ESAenabledtrueobject += [pscustomobject]@{ 'enabled' = "false" - } + } } $vsanObject = @() @@ -6905,7 +6905,7 @@ Function Export-VCFManagementDomainJsonSpec { } else { $fipsEnabled = "$false" } - + $managementDomainObject = New-Object -TypeName psobject $managementDomainObject | Add-Member -notepropertyname 'taskName' -notepropertyvalue "workflowconfig/workflowspec-ems.json" $managementDomainObject | Add-Member -notepropertyname 'sddcId' -notepropertyvalue $pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value @@ -6945,4 +6945,4 @@ Function Export-VCFManagementDomainJsonSpec { } Export-ModuleMember -Function Export-VCFManagementDomainJsonSpec -#EndRegion JSON Export Functions \ No newline at end of file +#EndRegion JSON Export Functions From 53c5d30fd0194e0b99699355af71d1a99f008c6d Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Wed, 3 Jul 2024 09:26:05 -0400 Subject: [PATCH 18/33] fix: json param in `Set-VCFCluster` (#282) Updates `Set-VCFCluster` validation of the JSON. Does not require the JSON parameter, but fails when it is not provided. Ref: #280 Signed-off-by: Ryan Johnson --- PowerVCF.psd1 | 118 +++++++++++++++++++++++++------------------------- PowerVCF.psm1 | 60 ++++++++++++------------- 2 files changed, 90 insertions(+), 88 deletions(-) diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index d68ce0f0a..87be6b89e 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -7,94 +7,94 @@ @{ -# Script module or binary module file associated with this manifest. -RootModule = 'PowerVCF.psm1' + # Script module or binary module file associated with this manifest. + RootModule = 'PowerVCF.psm1' -# Version number of this module. -ModuleVersion = '2.5.0.1010' + # Version number of this module. + ModuleVersion = '2.5.0.1011' -# Supported PSEditions -# CompatiblePSEditions = @() + # Supported PSEditions + # CompatiblePSEditions = @() -# ID used to uniquely identify this module -GUID = '0558cc7e-71a6-4b08-b9be-341d22653128' + # ID used to uniquely identify this module + GUID = '0558cc7e-71a6-4b08-b9be-341d22653128' -# Author of this module -Author = 'Broadcom' + # Author of this module + Author = 'Broadcom' -# Company or vendor of this module -CompanyName = 'Broadcom' + # Company or vendor of this module + CompanyName = 'Broadcom' -# Copyright statement for this module -Copyright = 'Copyright 2023-2024 Broadcom. All Rights Reserved.' + # Copyright statement for this module + Copyright = 'Copyright 2023-2024 Broadcom. All Rights Reserved.' -# Description of the functionality provided by this module -Description = 'PowerShell Module for VMware Cloud Foundation' + # Description of the functionality provided by this module + Description = 'PowerShell Module for VMware Cloud Foundation' -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '5.0' + # Minimum version of the Windows PowerShell engine required by this module + # PowerShellVersion = '5.0' -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' + # Name of the Windows PowerShell host required by this module + # PowerShellHostName = '' -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' + # Minimum version of the Windows PowerShell host required by this module + # PowerShellHostVersion = '' -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @('') + # Modules that must be imported into the global environment prior to importing this module + # RequiredModules = @('') -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() + # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess + # NestedModules = @() -# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = '*' + # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. + FunctionsToExport = '*' -# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. -CmdletsToExport = '*' + # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. + CmdletsToExport = '*' -# Variables to export from this module -VariablesToExport = '*' + # Variables to export from this module + VariablesToExport = '*' -# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -# AliasesToExport = @() + # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. + # AliasesToExport = @() -# DSC resources to export from this module -# DscResourcesToExport = @() + # DSC resources to export from this module + # DscResourcesToExport = @() -# List of all modules packaged with this module -# ModuleList = @() + # List of all modules packaged with this module + # ModuleList = @() -# List of all files packaged with this module -# FileList = @() + # List of all files packaged with this module + # FileList = @() -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ + # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. + PrivateData = @{ - PSData = @{ + PSData = @{ - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('VMware', 'CloudFoundation', 'VMwareCloudFoundation') + # Tags applied to this module. These help with module discovery in online galleries. + Tags = @('VMware', 'CloudFoundation', 'VMwareCloudFoundation') - # A URL to the license for this module. - LicenseUri = 'https://github.com/vmware/powershell-module-for-vmware-cloud-foundation/blob/main/LICENSE' + # A URL to the license for this module. + LicenseUri = 'https://github.com/vmware/powershell-module-for-vmware-cloud-foundation/blob/main/LICENSE' - # A URL to the main website for this project. - ProjectUri = 'https://vmware.github.io/powershell-module-for-vmware-cloud-foundation' + # A URL to the main website for this project. + ProjectUri = 'https://vmware.github.io/powershell-module-for-vmware-cloud-foundation' - # A URL to an icon representing this module. - IconUri = 'https://raw.githubusercontent.com/vmware/powershell-module-for-vmware-cloud-foundation/main/.github/icon-85px.svg' + # A URL to an icon representing this module. + IconUri = 'https://raw.githubusercontent.com/vmware/powershell-module-for-vmware-cloud-foundation/main/.github/icon-85px.svg' - # ReleaseNotes of this module - ReleaseNotes = 'https://vmware.github.io/powershell-module-for-vmware-cloud-foundation/release-notes/' + # ReleaseNotes of this module + ReleaseNotes = 'https://vmware.github.io/powershell-module-for-vmware-cloud-foundation/release-notes/' - } # End of PSData hashtable + } # End of PSData hashtable -} # End of PrivateData hashtable + } # End of PrivateData hashtable -# HelpInfo URI of this module -# HelpInfoURI = '' + # HelpInfo URI of this module + # HelpInfoURI = '' -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' + # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. + # DefaultCommandPrefix = '' } diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index b663fb620..da9a668c5 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -1229,22 +1229,24 @@ Function Set-VCFCluster { Throw "You must include either -json or -markForDeletion" } - $jsonBody = validateJsonInput -json $json # validate input file and format - $response = Validate-VCFUpdateClusterSpec -clusterid $id -json $jsonBody # validate the JSON provided meets the cluster specifications format - # the validation API does not currently support polling with a task ID - Start-Sleep -Seconds 5 - # Submit the job only if the JSON validation task finished with executionStatus of COMPLETED and resultStatus of SUCCEEDED. - if ($response.executionStatus -eq "COMPLETED" -and $response.resultStatus -eq "SUCCEEDED") { - Try { - Write-Output "Task validation completed successfully. Invoking cluster task on SDDC Manager" - $uri = "https://$sddcManager/v1/clusters/$id/" - $response = Invoke-RestMethod -Method PATCH -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody - $response - } Catch { - ResponseException -object $_ + if ($PsBoundParameters.ContainsKey("json")) { + $jsonBody = validateJsonInput -json $json # Validate input file and format. + $response = Validate-VCFUpdateClusterSpec -clusterid $id -json $jsonBody # Validate the JSON provided meets the cluster specifications format. + # The validation API does not currently support polling with a task ID. + Start-Sleep -Seconds 5 + # Submit the job only if the JSON validation task finished with executionStatus of COMPLETED and resultStatus of SUCCEEDED. + if ($response.executionStatus -eq "COMPLETED" -and $response.resultStatus -eq "SUCCEEDED") { + Try { + Write-Output "Task validation completed successfully. Invoking cluster task on SDDC Manager" + $uri = "https://$sddcManager/v1/clusters/$id/" + $response = Invoke-RestMethod -Method PATCH -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody + $response + } Catch { + ResponseException -object $_ + } + } else { + Write-Error "The validation task completed the run with the following problems: $($response.validationChecks.errorResponse.message)" } - } else { - Write-Error "The validation task completed the run with the following problems: $($response.validationChecks.errorResponse.message)" } if ($PsBoundParameters.ContainsKey("markForDeletion") -and ($PsBoundParameters.ContainsKey("id"))) { @@ -1718,11 +1720,11 @@ Function Get-VCFCredentialExpiry { $uri = "https://$sddcManager/v1/credentials/ui?includeExpiryOnly=true" $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers if ($PsBoundParameters.ContainsKey("resourceName")) { - $response.elements | Where-Object {$_.resource.resourceName -eq $resourceName} + $response.elements | Where-Object { $_.resource.resourceName -eq $resourceName } } elseif ($PsBoundParameters.ContainsKey("id")) { - $response.elements | Where-Object {$_.id -eq $id} + $response.elements | Where-Object { $_.id -eq $id } } elseif ($PsBoundParameters.ContainsKey("resourceType") ) { - $response.elements | Where-Object {$_.resource.resourceType -eq $resourceType} + $response.elements | Where-Object { $_.resource.resourceType -eq $resourceType } } else { $response.elements } @@ -3382,7 +3384,7 @@ Function New-VCFPersonality { createHeader # Set the Accept and Authorization headers. checkVCFToken # Validate the access token and refresh, if necessary. $uri = "https://$sddcManager/v1/personalities" - $response = Invoke-RestMethod -Method POST -ContentType 'application/json' -Uri $uri -Headers $headers -Body $body + $response = Invoke-RestMethod -Method POST -ContentType 'application/json' -Uri $uri -Headers $headers -Body $body $response } Catch { ResponseException -object $_ @@ -5210,7 +5212,7 @@ Function Set-VCFProxy { Param ( [Parameter (Mandatory = $true)] [ValidateSet("ENABLED", "DISABLED")] [ValidateNotNullOrEmpty()] [String]$status, [Parameter (Mandatory = $false, ParameterSetName = 'proxy')] [ValidateNotNullOrEmpty()] [String]$proxyHost, - [Parameter (Mandatory = $false, ParameterSetName = 'proxy')] [ValidateNotNullOrEmpty()] [ValidateRange(1,65535)] [Int]$proxyPort + [Parameter (Mandatory = $false, ParameterSetName = 'proxy')] [ValidateNotNullOrEmpty()] [ValidateRange(1, 65535)] [Int]$proxyPort ) Try { @@ -5815,7 +5817,7 @@ Function Remove-VCFIdentityProvider { #> Param ( - [Parameter (Mandatory = $true)] [ValidateSet("Embedded","Microsoft ADFS")] [String]$type, + [Parameter (Mandatory = $true)] [ValidateSet("Embedded", "Microsoft ADFS")] [String]$type, [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$domainName ) @@ -5824,10 +5826,10 @@ Function Remove-VCFIdentityProvider { createHeader # Set the Accept and Authorization headers. checkVCFToken # Validate the access token and refresh, if necessary. if ($type -eq "Embedded") { - $id = (Get-VCFIdentityProvider | Where-Object {$_.type -eq $type}).id + $id = (Get-VCFIdentityProvider | Where-Object { $_.type -eq $type }).id $uri = "https://$sddcManager/v1/identity-providers/$id/identity-sources/$domainName" } elseif ($type -eq "Microsoft ADFS") { - $id = (Get-VCFIdentityProvider | Where-Object {$_.type -eq $type}).id + $id = (Get-VCFIdentityProvider | Where-Object { $_.type -eq $type }).id $uri = "https://$sddcManager/v1/identity-providers/$id" } Invoke-RestMethod -Method DELETE -Uri $uri -Headers $headers # This API does not return a response. @@ -5865,7 +5867,7 @@ Function New-VCFIdentityProvider { #> Param ( - [Parameter (Mandatory = $true)] [ValidateSet("Embedded","Microsoft ADFS")] [String]$type, + [Parameter (Mandatory = $true)] [ValidateSet("Embedded", "Microsoft ADFS")] [String]$type, [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$json ) @@ -5875,7 +5877,7 @@ Function New-VCFIdentityProvider { checkVCFToken # Validate the access token and refresh, if necessary. if ($type -eq "Embedded") { $jsonBody = validateJsonInput -json $json - $id = (Get-VCFIdentityProvider | Where-Object {$_.type -eq $type}).id + $id = (Get-VCFIdentityProvider | Where-Object { $_.type -eq $type }).id $uri = "https://$sddcManager/v1/identity-providers/$id/identity-sources" } elseif ($type -eq "Microsoft ADFS") { $jsonBody = validateJsonInput -json $json @@ -5918,7 +5920,7 @@ Function Update-VCFIdentityProvider { #> Param ( - [Parameter (Mandatory = $true)] [ValidateSet("Embedded","Microsoft ADFS")] [String]$type, + [Parameter (Mandatory = $true)] [ValidateSet("Embedded", "Microsoft ADFS")] [String]$type, [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$domainName, [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$json ) @@ -5929,11 +5931,11 @@ Function Update-VCFIdentityProvider { checkVCFToken # Validate the access token and refresh, if necessary. if ($type -eq "Embedded") { $jsonBody = validateJsonInput -json $json - $id = (Get-VCFIdentityProvider | Where-Object {$_.type -eq $type}).id + $id = (Get-VCFIdentityProvider | Where-Object { $_.type -eq $type }).id $uri = "https://$sddcManager/v1/identity-providers/$id/identity-sources/$domainName" } elseif ($type -eq "Microsoft ADFS") { $jsonBody = validateJsonInput -json $json - $id = (Get-VCFIdentityProvider | Where-Object {$_.type -eq $type}).id + $id = (Get-VCFIdentityProvider | Where-Object { $_.type -eq $type }).id $uri = "https://$sddcManager/v1/identity-providers/$id" } Invoke-RestMethod -Method PATCH -Uri $uri -Headers $headers -ContentType 'application/json' -Body $jsonBody # This API does not return a response. @@ -6252,7 +6254,7 @@ Function validateJsonInput { # Validate the JSON string format. Try { - $jsonPSobject = ConvertFrom-Json $ConfigJson -ErrorAction Stop; + $jsonPSobject = ConvertFrom-Json $ConfigJson -ErrorAction Stop; $jsonValid = $true; } Catch { $jsonValid = $false; From bcffef0b132ae0c08b6179ff2369662a7777bb4e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 22:06:53 -0400 Subject: [PATCH 19/33] chore(deps): bump actions/setup-python from 5.1.0 to 5.1.1 (#285) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.0 to 5.1.1. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/82c7e631bb3cdc910f68e0081d67478d79c6982d...39cd14951b08e74b54015e9e001cdefcf80e669f) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e622db556..a978532bd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: 3.x - name: Install Dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2da0964a5..a8f5ae42c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,7 +136,7 @@ jobs: ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: 3.x - name: Install Dependencies From 907cc4640aa14354b11481deca95f2ab065e0297 Mon Sep 17 00:00:00 2001 From: William Lam Date: Wed, 31 Jul 2024 11:20:03 -0700 Subject: [PATCH 20/33] fix: Add Content-Type to default VCF request headers (#288) Signed-off-by: William Lam --- CHANGELOG.md | 1 + PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 627295dc7..72140c0c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Removed the deprecated `New-VCFNsxEdgeCluster` alias from `New-VCFEdgeCluster`. - Refactors `Invoke-VCFCommand` to run commands on SDDC Manager without the need for SSH across PowerShell editions and operating systems. - Added `Export-VCFManagementDomainJsonSpec` to export the JSON spec required for bringup from the Planning & Preparation Excel workbook. +- Enhanced the VCF request headers to include `Content-Type` to ensure REST API calls do not error out ## v2.4.1 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 87be6b89e..5b27045d0 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. - ModuleVersion = '2.5.0.1011' + ModuleVersion = '2.5.0.1012' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index da9a668c5..f542d9b8b 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -6147,6 +6147,7 @@ Function ResponseException { Function createHeader { $Global:headers = @{"Accept" = "application/json" } + $Global:headers = @{"Content-Type" = "application/json" } $Global:headers.Add("Authorization", "Bearer $accessToken") } From ccd5b608f3d8eb41556f2d3e14ecdc758cdc0b55 Mon Sep 17 00:00:00 2001 From: William Lam Date: Wed, 31 Jul 2024 13:36:32 -0700 Subject: [PATCH 21/33] feat: Enhance ResponseException function to accept optional JSON payload (#289) --- CHANGELOG.md | 1 + PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72140c0c2..c9e0ffa74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Refactors `Invoke-VCFCommand` to run commands on SDDC Manager without the need for SSH across PowerShell editions and operating systems. - Added `Export-VCFManagementDomainJsonSpec` to export the JSON spec required for bringup from the Planning & Preparation Excel workbook. - Enhanced the VCF request headers to include `Content-Type` to ensure REST API calls do not error out +- Enhanced `ResponseException` function to accept optional `-Body` parameter to include the JSON payload for ease of debugging ## v2.4.1 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 5b27045d0..d617dad7c 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. - ModuleVersion = '2.5.0.1012' + ModuleVersion = '2.5.0.1013' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index f542d9b8b..a715d5b40 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -6135,12 +6135,16 @@ Export-ModuleMember -Function Invoke-VCFCommand Function ResponseException { Param ( - [Parameter (Mandatory = $true)] [PSObject]$object + [Parameter (Mandatory = $true)] [PSObject]$object, + [Parameter (Mandatory = $false)] [PSObject]$body ) Write-Host "Script File: $($object.InvocationInfo.ScriptName) Line: $($object.InvocationInfo.ScriptLineNumber)" -ForegroundColor Red Write-Host "Relevant Command: $($object.InvocationInfo.Line.trim())" -ForegroundColor Red Write-Host "Target Uri: $($object.TargetObject.RequestUri.AbsoluteUri)" -ForegroundColor Red + if($body -ne $null -and $body -ne "") { + Write-Host "Target Payload: $body" -ForegroundColor Red + } Write-Host "Exception Message: $($object.Exception.Message)" -ForegroundColor Red Write-Host "Error Message: $($object.ErrorDetails.Message)" -ForegroundColor Red } From 37b3afc597131287356d9c9ddb69bb8f2c3f4143 Mon Sep 17 00:00:00 2001 From: William Lam Date: Thu, 1 Aug 2024 10:56:41 -0700 Subject: [PATCH 22/33] Fix Content-Type header + improve ease of adding additional (#290) --- PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index d617dad7c..5b0fae565 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. - ModuleVersion = '2.5.0.1013' + ModuleVersion = '2.5.0.1014' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index a715d5b40..f9c2ce1a6 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -6150,9 +6150,11 @@ Function ResponseException { } Function createHeader { - $Global:headers = @{"Accept" = "application/json" } - $Global:headers = @{"Content-Type" = "application/json" } - $Global:headers.Add("Authorization", "Bearer $accessToken") + $Global:headers = @{ + "Accept" = "application/json" + "Content-Type" = "application/json" + "Authorization" = "Bearer $accessToken" + } } Function createBasicAuthHeader { From df5680a90dbe8a1f67aaf099ff981df59a85ace1 Mon Sep 17 00:00:00 2001 From: William Lam Date: Wed, 7 Aug 2024 18:50:00 -0700 Subject: [PATCH 23/33] feat: add pci compliance audit functions (#291) - Added cmdlets for auditing PCI Compliance in VMware Cloud Foundation 5.2 and later. - Added `Get-VCFCompliance` to retrieve a specific compliance audit result. - Added `Get-VCFComplianceConfiguration` to retrieve a list of all compliance configurations along with their applicable resource types and versions. - Added `Get-VCFComplianceHistory` to retrieve the history for all compliance audits that have been performed. - Added `Get-VCFComplianceStandard` to retrieve a list of all compliance audit standards and versions that are supported. - Added `Get-VCFCompliance` to retrieve a specific compliance audit result. - Added `New-VCFCompliance` to run a new compliance audit. Signed-off-by: William Lam Co-authored-by: Ryan Johnson --- CHANGELOG.md | 31 ++- PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 237 ++++++++++++++++++ .../Set-VCFVrliConnection.md | 2 +- .../aria-operations/Get-VCFVrops.md | 2 +- .../aria-operations/Set-VCFVropsConnection.md | 2 +- .../aria-suite-lifecycle/New-VCFVrslcm.md | 2 +- .../authentication/Connect-CloudBuilder.md | 2 +- .../authentication/Request-VCFToken.md | 2 +- .../avns/Add-VCFApplicationVirtualNetwork.md | 2 +- .../avns/Get-VCFApplicationVirtualNetwork.md | 2 +- .../backup-restore/Get-VCFRestoreTask.md | 2 +- .../Set-VCFBackupConfiguration.md | 2 +- .../backup-restore/Start-VCFRestore.md | 2 +- .../functions/bundles/Get-VCFBundle.md | 2 +- .../functions/bundles/Request-VCFBundle.md | 2 +- .../bundles/Start-VCFBundleUpload.md | 2 +- .../functions/ceip/Set-VCFCeip.md | 2 +- .../certificates/Get-VCFCertificate.md | 2 +- .../Get-VCFCertificateAuthority.md | 2 +- .../certificates/Get-VCFCertificateCsr.md | 2 +- .../Remove-VCFCertificateAuthority.md | 2 +- .../certificates/Request-VCFCertificate.md | 2 +- .../certificates/Request-VCFCertificateCsr.md | 2 +- .../certificates/Set-VCFCertificate.md | 2 +- .../certificates/Set-VCFMicrosoftCa.md | 2 +- .../certificates/Set-VCFOpensslCa.md | 2 +- .../functions/clusters/Get-VCFCluster.md | 2 +- .../clusters/Get-VCFClusterValidation.md | 2 +- .../functions/clusters/New-VCFCluster.md | 2 +- .../functions/clusters/Remove-VCFCluster.md | 2 +- .../functions/clusters/Set-VCFCluster.md | 2 +- .../functions/compliance/Get-VCFCompliance.md | 73 ++++++ .../Get-VCFComplianceConfiguration.md | 37 +++ .../compliance/Get-VCFComplianceHistory.md | 53 ++++ .../compliance/Get-VCFComplianceStandard.md | 29 +++ .../compliance/Get-VCFComplianceTask.md | 67 +++++ .../functions/compliance/New-VCFCompliance.md | 95 +++++++ .../credentials/Get-VCFCredential.md | 2 +- .../credentials/Get-VCFCredentialExpiry.md | 2 +- .../credentials/Get-VCFCredentialTask.md | 2 +- .../credentials/Restart-VCFCredentialTask.md | 2 +- .../credentials/Set-VCFCredential.md | 2 +- .../Set-VCFCredentialAutoRotatePolicy.md | 2 +- .../credentials/Stop-VCFCredentialTask.md | 2 +- .../depots/Get-VCFDepotCredential.md | 2 +- .../depots/Set-VCFDepotCredential.md | 2 +- .../Get-VCFConfigurationDNSValidation.md | 2 +- .../Get-VCFConfigurationNTPValidation.md | 2 +- .../dns-ntp/Set-VCFConfigurationDNS.md | 2 +- .../dns-ntp/Set-VCFConfigurationNTP.md | 2 +- .../domains/Get-VCFWorkloadDomain.md | 2 +- .../domains/New-VCFWorkloadDomain.md | 2 +- .../domains/Remove-VCFWorkloadDomain.md | 2 +- .../domains/Set-VCFWorkloadDomain.md | 2 +- .../federation/Get-VCFFederationTask.md | 2 +- .../federation/Join-VCFFederation.md | 2 +- .../federation/New-VCFFederationInvite.md | 2 +- .../functions/federation/Set-VCFFederation.md | 2 +- .../functions/hosts/Get-VCFHost.md | 2 +- .../hosts/New-VCFCommissionedHost.md | 2 +- .../hosts/Remove-VCFCommissionedHost.md | 2 +- .../functions/iam/Get-VCFUser.md | 2 +- .../functions/iam/New-VCFGroup.md | 2 +- .../functions/iam/New-VCFServiceUser.md | 2 +- .../functions/iam/New-VCFUser.md | 2 +- .../functions/iam/Remove-VCFUser.md | 2 +- .../functions/idp/Get-VCFIdentityProvider.md | 2 +- .../functions/idp/New-VCFIdentityProvider.md | 2 +- .../idp/Remove-VCFIdentityProvider.md | 2 +- .../idp/Update-VCFIdentityProvider.md | 2 +- .../functions/licenses/Get-VCFLicenseKey.md | 2 +- .../functions/licenses/New-VCFLicenseKey.md | 2 +- .../licenses/Remove-VCFLicenseKey.md | 2 +- .../network-pools/Add-VCFNetworkIPPool.md | 2 +- .../network-pools/Get-VCFNetworkIPPool.md | 2 +- .../network-pools/Get-VCFNetworkPool.md | 2 +- .../network-pools/New-VCFNetworkPool.md | 2 +- .../network-pools/Remove-VCFNetworkIPPool.md | 2 +- .../network-pools/Remove-VCFNetworkPool.md | 2 +- .../nsx-edge-clusters/Get-VCFEdgeCluster.md | 2 +- .../nsx-edge-clusters/New-VCFEdgeCluster.md | 2 +- .../nsx/nsx-managers/Get-VCFNsxtCluster.md | 2 +- .../functions/other/Invoke-VCFCommand.md | 2 +- .../personalities/Get-VCFPersonality.md | 2 +- .../personalities/New-VCFPersonality.md | 2 +- .../functions/pscs/Get-VCFPSC.md | 2 +- .../functions/releases/Get-VCFRelease.md | 2 +- .../functions/sddc-managers/Get-VCFManager.md | 2 +- .../functions/sddc/Get-CloudBuilderSDDC.md | 2 +- .../sddc/Get-CloudBuilderSDDCValidation.md | 2 +- .../sddc/Restart-CloudBuilderSDDC.md | 2 +- .../Restart-CloudBuilderSDDCValidation.md | 2 +- .../functions/sddc/Start-CloudBuilderSDDC.md | 2 +- .../sddc/Start-CloudBuilderSDDCValidation.md | 2 +- .../sddc/Stop-CloudBuilderSDDCValidation.md | 2 +- .../functions/services/Get-VCFService.md | 2 +- .../functions/sos/Get-VCFHealthSummaryTask.md | 2 +- .../functions/sos/Get-VCFSupportBundleTask.md | 2 +- .../sos/Request-VCFHealthSummaryBundle.md | 2 +- .../functions/sos/Request-VCFSupportBundle.md | 2 +- .../functions/sos/Start-VCFHealthSummary.md | 2 +- .../functions/sos/Start-VCFSupportBundle.md | 2 +- .../Get-VCFSystemPrecheckTask.md | 2 +- .../Start-VCFSystemPrecheck.md | 2 +- .../functions/tasks/Get-VCFTask.md | 2 +- .../functions/tasks/Restart-VCFTask.md | 2 +- .../functions/upgrades/Get-VCFUpgrade.md | 2 +- .../functions/upgrades/Start-VCFUpgrade.md | 2 +- .../functions/vcenters/Get-VCFvCenter.md | 2 +- mkdocs.yml | 13 +- 111 files changed, 722 insertions(+), 117 deletions(-) create mode 100644 docs/documentation/functions/compliance/Get-VCFCompliance.md create mode 100644 docs/documentation/functions/compliance/Get-VCFComplianceConfiguration.md create mode 100644 docs/documentation/functions/compliance/Get-VCFComplianceHistory.md create mode 100644 docs/documentation/functions/compliance/Get-VCFComplianceStandard.md create mode 100644 docs/documentation/functions/compliance/Get-VCFComplianceTask.md create mode 100644 docs/documentation/functions/compliance/New-VCFCompliance.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c9e0ffa74..76e12c99b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,22 +4,29 @@ > Released: Unreleased +- Added cmdlets for auditing PCI Compliance in VMware Cloud Foundation 5.2 and later. + - Added `Get-VCFCompliance` to retrieve a specific compliance audit result. + - Added `Get-VCFComplianceConfiguration` to retrieve a list of all compliance configurations along with their applicable resource types and versions. + - Added `Get-VCFComplianceHistory` to retrieve the history for all compliance audits that have been performed. + - Added `Get-VCFComplianceStandard` to retrieve a list of all compliance audit standards and versions that are supported. + - Added `Get-VCFCompliance` to retrieve a specific compliance audit result. + - Added `New-VCFCompliance` to run a new compliance audit. +- Added `Export-VCFManagementDomainJsonSpec` to export the JSON specification required for bring-up from the Planning and Preparation workbook. +- Enhanced the request headers to include `Content-Type` to ensure REST API calls do not error out. +- Enhanced `ResponseException` function to accept optional `-Body` parameter to include the JSON payload for ease of debugging. +- Enhanced `New-VCFWorkloadDomain` cmdlet to improve error handling. +- Enhanced `New-VCFCommissionedHost` cmdlet to improve error handling. +- Enhanced `New-VCFCommissionedHost` cmdlet with ability to use the host commission JSON specification provided by the SDDC Manager UI. - Updated `Get-VCFTask` cmdlet with additional exception message to catch. - Updated `Get-VCFSystemPrecheckTask` cmdlet with optional parameter `failureOnly`. - Updated `Get-VCFPersonality` cmdlet with optional parameter `name`. - Updated `New-VCFWorkloadDomain` cmdlet with optional parameter `validate` to validate the JSON specification. -- Enhanced `New-VCFWorkloadDomain` cmdlet to improve error handling. -- Enhanced `New-VCFCommissionedHost` cmdlet to improve error handling. -- Enhanced `New-VCFCommissionedHost` cmdlet with ability to use the host commission JSON specification provided by the SDDC Manager UI. -- Removed the deprecated `Commission-VCFHost` alias from `New-VCFCommissionedHost`. -- Removed the deprecated `Decommission-VCFHost` alias from `Remove-VCFCommissionedHost`. -- Removed the deprecated `Get-VCFNsxManagerCluster` alias from `Get-VCFNsxtCluster`. -- Removed the deprecated `Get-VCFNsxEdgeCluster` alias from `Get-VCFEdgeCluster`. -- Removed the deprecated `New-VCFNsxEdgeCluster` alias from `New-VCFEdgeCluster`. -- Refactors `Invoke-VCFCommand` to run commands on SDDC Manager without the need for SSH across PowerShell editions and operating systems. -- Added `Export-VCFManagementDomainJsonSpec` to export the JSON spec required for bringup from the Planning & Preparation Excel workbook. -- Enhanced the VCF request headers to include `Content-Type` to ensure REST API calls do not error out -- Enhanced `ResponseException` function to accept optional `-Body` parameter to include the JSON payload for ease of debugging +- Refactored `Invoke-VCFCommand` to run commands on SDDC Manager without the need for SSH across PowerShell editions and operating systems. +- Removed deprecated `Commission-VCFHost` alias from `New-VCFCommissionedHost`. +- Removed deprecated `Decommission-VCFHost` alias from `Remove-VCFCommissionedHost`. +- Removed deprecated `Get-VCFNsxManagerCluster` alias from `Get-VCFNsxtCluster`. +- Removed deprecated `Get-VCFNsxEdgeCluster` alias from `Get-VCFEdgeCluster`. +- Removed deprecated `New-VCFNsxEdgeCluster` alias from `New-VCFEdgeCluster`. ## v2.4.1 diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 5b0fae565..3fc099fb5 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. - ModuleVersion = '2.5.0.1014' + ModuleVersion = '2.5.0.1015' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index f9c2ce1a6..df6c01ee6 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -5950,6 +5950,243 @@ Export-ModuleMember -Function Update-VCFIdentityProvider #EndRegion APIs for managing Identity Providers +#Region APIs for Compliance Service +Function Get-VCFComplianceConfiguration { + <# + .SYNOPSIS + Retrieves the list of all compliance configurations along with their applicable resource types and versions. + + .DESCRIPTION + The Get-VCFComplianceConfiguration cmdlet retrieves the list of all compliance configurations along with their applicable resource types and versions. + + .EXAMPLE + Get-VCFComplianceConfiguration + This example shows how to retrieve a list of all compliance configurations. + #> + + Try { + if ((Get-VCFManager -version) -ge '5.2.0') { + createHeader # Set the Accept and Authorization headers. + checkVCFToken # Validate the access token and refresh, if necessary. + $uri = "https://$sddcManager/v1/compliance-configurations" + $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers + Return ($response).elements + } else { + Write-Warning "$msgVcfApiNotSupported $(Get-VCFManager -version)" + } + } Catch { + ResponseException -Object $_ + } +} +Export-ModuleMember -Function Get-VCFComplianceConfiguration + +Function Get-VCFComplianceStandard { + <# + .SYNOPSIS + Retrieves the list of all compliance standards and versions that are supported. + + .DESCRIPTION + The Get-VCFComplianceStandard cmdlet retrieves the the list of all compliance standards and versions that are supported. + + .EXAMPLE + Get-VCFComplianceStandard + This example shows how to retrieve a list of all compliance standards and versions. + #> + + Try { + if ((Get-VCFManager -version) -ge '5.2.0') { + createHeader # Set the Accept and Authorization headers. + checkVCFToken # Validate the access token and refresh, if necessary. + $uri = "https://$sddcManager/v1/compliance-standards" + $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers + Return ($response).elements + } else { + Write-Warning "$msgVcfApiNotSupported $(Get-VCFManager -version)" + } + } Catch { + ResponseException -Object $_ + } +} +Export-ModuleMember -Function Get-VCFComplianceStandard + +Function Get-VCFComplianceHistory { + <# + .SYNOPSIS + Retrieves the history for all compliance audits that have been performed. + + .DESCRIPTION + The Get-VCFComplianceHistory cmdlet retrieves the history for all compliance audits that have been performed. + + .EXAMPLE + Get-VCFIdentityProvider + This example shows how to retrieve the history for all compliance audits that have been performed. + + .EXAMPLE + Get-VCFComplianceHistory + #> + + Try { + if ((Get-VCFManager -version) -ge '5.2.0') { + createHeader # Set the Accept and Authorization headers. + checkVCFToken # Validate the access token and refresh, if necessary. + $uri = "https://$sddcManager/v1/compliance-audits" + $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers + Return ($response).elements + } else { + Write-Warning "$msgVcfApiNotSupported $(Get-VCFManager -version)" + } + } Catch { + ResponseException -Object $_ + } +} +Export-ModuleMember -Function Get-VCFComplianceHistory + +Function New-VCFCompliance { + <# + .SYNOPSIS + Performs a new compliance audit. + + .DESCRIPTION + The Get-VCFIdentityProvider cmdlet retrieves the history for all compliance audits. + + .EXAMPLE + New-VCFCompliance -resourceType "SDDC_MANAGER" -standardType "PCI" -standardVersion "4.0" -domainName "sfo-m01" + This example shows how to perform a new compliance audit. + + .PARAMETER resourceType + Specifies the resource type for the compliance audit. Please use Get-VCFComplianceConfiguration to see available options. + + .PARAMETER standardType + Specifies the compliance type for the compliance audit. Please use Get-VCFComplianceStandard to see available options. + + .PARAMETER standardVersion + Specifies the compliance version for the compliance audit. Please use Get-VCFComplianceStandard to see available options. + + .PARAMETER domainName + Specifies the name of the workload domain. + #> + + Param ( + [Parameter (Mandatory = $true)] [ValidateSet("SDDC_MANAGER")] [String]$resourceType = "SDDC_MANAGER", + [Parameter (Mandatory = $true)] [String]$standardType, + [Parameter (Mandatory = $true)] [String]$standardVersion, + [Parameter (Mandatory = $true)] [String]$domainName + ) + + $vcfWorkloadDomainDetails = Get-VCFWorkloadDomain -Name $domainName + + Try { + if ((Get-VCFManager -version) -ge '5.2.0') { + createHeader # Set the Accept and Authorization headers. + checkVCFToken # Validate the access token and refresh, if necessary. + $uri = "https://$sddcManager/v1/domains/$($vcfWorkloadDomainDetails.id)/compliance-audits" + + $spec = [Ordered]@{ + "standardType" = $standardType + "standardVersion" = $standardVersion + "complianceResourcesConfigurationSpec" = @( + @{ + "resources" = @( + @{ + "resourceType" = $resourceType + } + ) + } + ) + } + + $body = $spec | ConvertTo-Json -Depth 4 + + $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -Body $body + Return $response + } else { + Write-Warning "$msgVcfApiNotSupported $(Get-VCFManager -version)" + } + } Catch { + ResponseException -Object $_ -body $body + } +} +Export-ModuleMember -Function New-VCFCompliance + +Function Get-VCFComplianceTask { + <# + .SYNOPSIS + Retrieves the compliance audit id and progress using the task id returned from the New-VCFCompliance operation. + + .DESCRIPTION + The Get-VCFComplianceTask cmdlet retrieves the compliance audit id and progress using the task id returned from the New-VCFCompliance operation. + + .EXAMPLE + Get-VCFComplianceTask -domainName "sfo-m01" -complianceTaskId "d22c47e0-8d38-43da-975b-938e7c59f4d6" + This example shows how to retrieve the compliance audit id and progress using the task id returned from the New-VCFCompliance operation. + + .PARAMETER domainName + SSpecifies the name of the workload domain. + + .PARAMETER complianceTaskId + Specifies the compliance task id returned from New-VCFCompliance. + #> + + Param ( + [Parameter (Mandatory = $true)] [String]$domainName, + [Parameter (Mandatory = $true)] [String]$complianceTaskId + ) + + $vcfWorkloadDomainDetails = Get-VCFWorkloadDomain -Name $domainName + + Try { + if ((Get-VCFManager -version) -ge '5.2.0') { + createHeader # Set the Accept and Authorization headers. + checkVCFToken # Validate the access token and refresh, if necessary. + $uri = "https://$sddcManager/v1/domains/$($vcfWorkloadDomainDetails.id)/compliance-audits/tasks/${complianceTaskId}" + $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers + Return $response + } else { + Write-Warning "$msgVcfApiNotSupported $(Get-VCFManager -version)" + } + } Catch { + ResponseException -Object $_ + } +} +Export-ModuleMember -Function Get-VCFComplianceTask + +Function Get-VCFCompliance { + <# + .SYNOPSIS + Retrieves a specific compliance audit result. + + .DESCRIPTION + The Get-VCFCompliance cmdlet retrieves a specific compliance audit result. + + .EXAMPLE + Get-VCFCompliance -complianceAuditId "1758e972-8509-4dce-93d9-a303d7c35a41" + This example shows how to retrieve a specific compliance audit result. + + .PARAMETER complianceAuditId + Specifies the compliance task id returned from Get-VCFComplianceTask or Get-VCFComplianceHistory. + #> + + Param ( + [Parameter (Mandatory = $true)] [String]$complianceAuditId + ) + + Try { + if ((Get-VCFManager -version) -ge '5.2.0') { + createHeader # Set the Accept and Authorization headers. + checkVCFToken # Validate the access token and refresh, if necessary. + $uri = "https://$sddcManager/v1/compliance-audits/${complianceAuditId}/compliance-audit-items" + $response = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers + Return ($response).elements + } else { + Write-Warning "$msgVcfApiNotSupported $(Get-VCFManager -version)" + } + } Catch { + ResponseException -Object $_ + } +} +Export-ModuleMember -Function Get-VCFCompliance +#EndRegion APIs for Compliance Service + #Region APIs for managing Validations (Not Exported) # The following functions are not exported since they are used internally by the cmdlets that manage the validations. diff --git a/docs/documentation/functions/aria-suite/aria-operations-logs/Set-VCFVrliConnection.md b/docs/documentation/functions/aria-suite/aria-operations-logs/Set-VCFVrliConnection.md index a42902f04..fd6188efb 100644 --- a/docs/documentation/functions/aria-suite/aria-operations-logs/Set-VCFVrliConnection.md +++ b/docs/documentation/functions/aria-suite/aria-operations-logs/Set-VCFVrliConnection.md @@ -72,4 +72,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/aria-suite/aria-operations/Get-VCFVrops.md b/docs/documentation/functions/aria-suite/aria-operations/Get-VCFVrops.md index 4d2aa0f9d..9f51c1bdd 100644 --- a/docs/documentation/functions/aria-suite/aria-operations/Get-VCFVrops.md +++ b/docs/documentation/functions/aria-suite/aria-operations/Get-VCFVrops.md @@ -56,4 +56,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/aria-suite/aria-operations/Set-VCFVropsConnection.md b/docs/documentation/functions/aria-suite/aria-operations/Set-VCFVropsConnection.md index 0d9d0d4bd..2865d9104 100644 --- a/docs/documentation/functions/aria-suite/aria-operations/Set-VCFVropsConnection.md +++ b/docs/documentation/functions/aria-suite/aria-operations/Set-VCFVropsConnection.md @@ -72,4 +72,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/aria-suite/aria-suite-lifecycle/New-VCFVrslcm.md b/docs/documentation/functions/aria-suite/aria-suite-lifecycle/New-VCFVrslcm.md index 60d446b9a..fb03c4600 100644 --- a/docs/documentation/functions/aria-suite/aria-suite-lifecycle/New-VCFVrslcm.md +++ b/docs/documentation/functions/aria-suite/aria-suite-lifecycle/New-VCFVrslcm.md @@ -78,4 +78,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/authentication/Connect-CloudBuilder.md b/docs/documentation/functions/authentication/Connect-CloudBuilder.md index e7d2d6705..629cc036e 100644 --- a/docs/documentation/functions/authentication/Connect-CloudBuilder.md +++ b/docs/documentation/functions/authentication/Connect-CloudBuilder.md @@ -96,4 +96,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/authentication/Request-VCFToken.md b/docs/documentation/functions/authentication/Request-VCFToken.md index 8fa5acb82..9909209d5 100644 --- a/docs/documentation/functions/authentication/Request-VCFToken.md +++ b/docs/documentation/functions/authentication/Request-VCFToken.md @@ -100,4 +100,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/avns/Add-VCFApplicationVirtualNetwork.md b/docs/documentation/functions/avns/Add-VCFApplicationVirtualNetwork.md index c287ecd3a..3556c5912 100644 --- a/docs/documentation/functions/avns/Add-VCFApplicationVirtualNetwork.md +++ b/docs/documentation/functions/avns/Add-VCFApplicationVirtualNetwork.md @@ -80,4 +80,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/avns/Get-VCFApplicationVirtualNetwork.md b/docs/documentation/functions/avns/Get-VCFApplicationVirtualNetwork.md index 45affa521..b7f593199 100644 --- a/docs/documentation/functions/avns/Get-VCFApplicationVirtualNetwork.md +++ b/docs/documentation/functions/avns/Get-VCFApplicationVirtualNetwork.md @@ -76,4 +76,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/backup-restore/Get-VCFRestoreTask.md b/docs/documentation/functions/backup-restore/Get-VCFRestoreTask.md index b3ff322bb..fc49e16e3 100644 --- a/docs/documentation/functions/backup-restore/Get-VCFRestoreTask.md +++ b/docs/documentation/functions/backup-restore/Get-VCFRestoreTask.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/backup-restore/Set-VCFBackupConfiguration.md b/docs/documentation/functions/backup-restore/Set-VCFBackupConfiguration.md index 2192df5e1..7405d05b8 100644 --- a/docs/documentation/functions/backup-restore/Set-VCFBackupConfiguration.md +++ b/docs/documentation/functions/backup-restore/Set-VCFBackupConfiguration.md @@ -50,4 +50,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/backup-restore/Start-VCFRestore.md b/docs/documentation/functions/backup-restore/Start-VCFRestore.md index e232ceaa1..803ba6885 100644 --- a/docs/documentation/functions/backup-restore/Start-VCFRestore.md +++ b/docs/documentation/functions/backup-restore/Start-VCFRestore.md @@ -60,4 +60,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/bundles/Get-VCFBundle.md b/docs/documentation/functions/bundles/Get-VCFBundle.md index 01ffd83d5..86386aa2f 100644 --- a/docs/documentation/functions/bundles/Get-VCFBundle.md +++ b/docs/documentation/functions/bundles/Get-VCFBundle.md @@ -72,4 +72,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/bundles/Request-VCFBundle.md b/docs/documentation/functions/bundles/Request-VCFBundle.md index 7c24bc945..71c48bc8f 100644 --- a/docs/documentation/functions/bundles/Request-VCFBundle.md +++ b/docs/documentation/functions/bundles/Request-VCFBundle.md @@ -48,4 +48,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/bundles/Start-VCFBundleUpload.md b/docs/documentation/functions/bundles/Start-VCFBundleUpload.md index 440290517..91dc112b2 100644 --- a/docs/documentation/functions/bundles/Start-VCFBundleUpload.md +++ b/docs/documentation/functions/bundles/Start-VCFBundleUpload.md @@ -54,4 +54,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/ceip/Set-VCFCeip.md b/docs/documentation/functions/ceip/Set-VCFCeip.md index 65057ca15..fc1ab854a 100644 --- a/docs/documentation/functions/ceip/Set-VCFCeip.md +++ b/docs/documentation/functions/ceip/Set-VCFCeip.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/certificates/Get-VCFCertificate.md b/docs/documentation/functions/certificates/Get-VCFCertificate.md index fc9d3355b..f3c263b43 100644 --- a/docs/documentation/functions/certificates/Get-VCFCertificate.md +++ b/docs/documentation/functions/certificates/Get-VCFCertificate.md @@ -84,4 +84,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/certificates/Get-VCFCertificateAuthority.md b/docs/documentation/functions/certificates/Get-VCFCertificateAuthority.md index 16b3558b4..75eb9155e 100644 --- a/docs/documentation/functions/certificates/Get-VCFCertificateAuthority.md +++ b/docs/documentation/functions/certificates/Get-VCFCertificateAuthority.md @@ -60,4 +60,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/certificates/Get-VCFCertificateCsr.md b/docs/documentation/functions/certificates/Get-VCFCertificateCsr.md index f06ab9469..812b9f161 100644 --- a/docs/documentation/functions/certificates/Get-VCFCertificateCsr.md +++ b/docs/documentation/functions/certificates/Get-VCFCertificateCsr.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/certificates/Remove-VCFCertificateAuthority.md b/docs/documentation/functions/certificates/Remove-VCFCertificateAuthority.md index 6b3123901..a07a80678 100644 --- a/docs/documentation/functions/certificates/Remove-VCFCertificateAuthority.md +++ b/docs/documentation/functions/certificates/Remove-VCFCertificateAuthority.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/certificates/Request-VCFCertificate.md b/docs/documentation/functions/certificates/Request-VCFCertificate.md index 23cbfb7ba..99af83ceb 100644 --- a/docs/documentation/functions/certificates/Request-VCFCertificate.md +++ b/docs/documentation/functions/certificates/Request-VCFCertificate.md @@ -74,4 +74,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/certificates/Request-VCFCertificateCsr.md b/docs/documentation/functions/certificates/Request-VCFCertificateCsr.md index f8c0e838c..aba65e360 100644 --- a/docs/documentation/functions/certificates/Request-VCFCertificateCsr.md +++ b/docs/documentation/functions/certificates/Request-VCFCertificateCsr.md @@ -70,4 +70,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/certificates/Set-VCFCertificate.md b/docs/documentation/functions/certificates/Set-VCFCertificate.md index 87cfd6d3e..f69d74f1c 100644 --- a/docs/documentation/functions/certificates/Set-VCFCertificate.md +++ b/docs/documentation/functions/certificates/Set-VCFCertificate.md @@ -66,4 +66,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/certificates/Set-VCFMicrosoftCa.md b/docs/documentation/functions/certificates/Set-VCFMicrosoftCa.md index b2baf79c3..5aec25bfe 100644 --- a/docs/documentation/functions/certificates/Set-VCFMicrosoftCa.md +++ b/docs/documentation/functions/certificates/Set-VCFMicrosoftCa.md @@ -92,4 +92,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/certificates/Set-VCFOpensslCa.md b/docs/documentation/functions/certificates/Set-VCFOpensslCa.md index e19f54aea..7289976c4 100644 --- a/docs/documentation/functions/certificates/Set-VCFOpensslCa.md +++ b/docs/documentation/functions/certificates/Set-VCFOpensslCa.md @@ -124,4 +124,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/clusters/Get-VCFCluster.md b/docs/documentation/functions/clusters/Get-VCFCluster.md index d672e1d41..218d6ca8c 100644 --- a/docs/documentation/functions/clusters/Get-VCFCluster.md +++ b/docs/documentation/functions/clusters/Get-VCFCluster.md @@ -100,4 +100,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/clusters/Get-VCFClusterValidation.md b/docs/documentation/functions/clusters/Get-VCFClusterValidation.md index 01d6ff4d5..561abceec 100644 --- a/docs/documentation/functions/clusters/Get-VCFClusterValidation.md +++ b/docs/documentation/functions/clusters/Get-VCFClusterValidation.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/clusters/New-VCFCluster.md b/docs/documentation/functions/clusters/New-VCFCluster.md index bac17b7b7..50422d1d2 100644 --- a/docs/documentation/functions/clusters/New-VCFCluster.md +++ b/docs/documentation/functions/clusters/New-VCFCluster.md @@ -129,4 +129,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/clusters/Remove-VCFCluster.md b/docs/documentation/functions/clusters/Remove-VCFCluster.md index 735de5a14..93203c663 100644 --- a/docs/documentation/functions/clusters/Remove-VCFCluster.md +++ b/docs/documentation/functions/clusters/Remove-VCFCluster.md @@ -49,4 +49,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/clusters/Set-VCFCluster.md b/docs/documentation/functions/clusters/Set-VCFCluster.md index d767f79cf..ca3dc410e 100644 --- a/docs/documentation/functions/clusters/Set-VCFCluster.md +++ b/docs/documentation/functions/clusters/Set-VCFCluster.md @@ -109,4 +109,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/compliance/Get-VCFCompliance.md b/docs/documentation/functions/compliance/Get-VCFCompliance.md new file mode 100644 index 000000000..7b15002e9 --- /dev/null +++ b/docs/documentation/functions/compliance/Get-VCFCompliance.md @@ -0,0 +1,73 @@ +# Get-VCFCompliance + +## Synopsis + +Retrieves a specific compliance audit result. + +## Syntax + +```powershell +Get-VCFCompliance [-complianceAuditId] [] +``` + +## Description + +The `Get-VCFCompliance` cmdlet retrieves a specific compliance audit result. + +## Examples + +### Example 1 + +```powershell +Get-VCFCompliance -complianceAuditId "1758e972-8509-4dce-93d9-a303d7c35a41" + +resourceType : SDDC_MANAGER +resourceName : sfo-vcf01.sfo.rainpole.io +configurationId : 1602 +configurationTitle : Install Security Patches and updates for SDDC Manager. +isConfigurationRecommendedByStandard : True +citationReference : 6.3.3, 6.3.3 Bullet 1, 6.3.3 Bullet 2 +recommendedValue : TRUE +actualValue : FALSE +complianceStatus : NON_COMPLIANT +remediationStep : To apply patches and updates to SDDC Manager/Cloud Foundation follow the guidance in the Lifecycle Management section found at the URL below. + https://docs.vmware.com/en/VMware-Cloud-Foundation/5.0/vcf-lifecycle/GUID-B384B08D-3652-45E2-8AA9-AF53066F5F70.html +complianceAuditStatus : SUCCEEDED + +resourceType : SDDC_MANAGER +resourceName : sfo-vcf01.sfo.rainpole.io +configurationId : 1601 +configurationTitle : SDDC Manager components must use an authoritative time source. +isConfigurationRecommendedByStandard : True +citationReference : 10.6.1, 10.6.2 Bullet 6, 10.6.2, 10.6.2 Bullet 2, 10.6.2 Bullet 3 +recommendedValue : TRUE +actualValue : TRUE +complianceStatus : COMPLIANT +remediationStep : From the SDDC Manager UI, navigate to Administration >> Network Settings >> NTP Configuration Click 'Edit'. Review the information on updating NTP and click 'Next'. Review the + prerequisites and click 'Next'. Enter new authoritative NTP servers in the text box and click 'Save'. +complianceAuditStatus : SUCCEEDED +``` + +This example shows how to retrieve a specific compliance audit result. + +## Parameters + +### -complianceAuditId + +Specified the compliance task returned from `Get-VCFComplianceTask` or `Get-VCFComplianceHistory`. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### Common Parameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/compliance/Get-VCFComplianceConfiguration.md b/docs/documentation/functions/compliance/Get-VCFComplianceConfiguration.md new file mode 100644 index 000000000..c16a1aa3c --- /dev/null +++ b/docs/documentation/functions/compliance/Get-VCFComplianceConfiguration.md @@ -0,0 +1,37 @@ +# Get-VCFComplianceConfiguration + +## Synopsis + +Retrieves the list of all compliance configurations along with their applicable resource types and versions. + +## Syntax + +```powershell +Get-VCFComplianceConfiguration +``` + +## Description + +The `Get-VCFComplianceConfiguration` cmdlet retrieves the list of all compliance configurations along with their applicable resource types and versions. + +## Examples + +### Example 1 + +```powershell +Get-VCFComplianceConfiguration + +configurationId configurationTitle complianceResourceStandardConfigurationDetails +--------------- ------------------ ---------------------------------------------- +1600 Verify SDDC Manager backup. {@{resourceType=SDDC_MANAGER; resourceVersion=5.2.0.0; standardConfigurationDetails=System.Object[]}} +1601 SDDC Manager components must use an authoritative time source. {@{resourceType=SDDC_MANAGER; resourceVersion=5.2.0.0; standardConfigurationDetails=System.Object[]}} +1602 Install Security Patches and updates for SDDC Manager. {@{resourceType=SDDC_MANAGER; resourceVersion=5.2.0.0; standardConfigurationDetails=System.Object[]}} +1603 Use an SSL certificate issued by a trusted certificate authority on the SDDC Manager. {@{resourceType=SDDC_MANAGER; resourceVersion=5.2.0.0; standardConfigurationDetails=System.Object[]}} +1604 Do not expose SDDC Manager directly on the Internet. {@{resourceType=SDDC_MANAGER; resourceVersion=5.2.0.0; standardConfigurationDetails=System.Object[]}} +1605 Assign least privileges to users and service accounts in SDDC Manager. {@{resourceType=SDDC_MANAGER; resourceVersion=5.2.0.0; standardConfigurationDetails=System.Object[]}} +1607 Dedicate an account for downloading updates and patches in SDDC Manager. {@{resourceType=SDDC_MANAGER; resourceVersion=5.2.0.0; standardConfigurationDetails=System.Object[]}} +1608 SDDC Manager must be deployed with FIPS mode enabled. {@{resourceType=SDDC_MANAGER; resourceVersion=5.2.0.0; standardConfigurationDetails=System.Object[]}} +1609 SDDC Manager must schedule automatic password rotation. {@{resourceType=SDDC_MANAGER; resourceVersion=5.2.0.0; standardConfigurationDetails=System.Object[]}} +``` + +This example shows how to retrieve a list of all compliance configurations. diff --git a/docs/documentation/functions/compliance/Get-VCFComplianceHistory.md b/docs/documentation/functions/compliance/Get-VCFComplianceHistory.md new file mode 100644 index 000000000..86105befe --- /dev/null +++ b/docs/documentation/functions/compliance/Get-VCFComplianceHistory.md @@ -0,0 +1,53 @@ +# Get-VCFComplianceHistory + +## Synopsis + +Retrieves the history for all compliance audits that have been performed. + +## Syntax + +```powershell +Get-VCFComplianceHistory +``` + +## Description + +The `Get-VCFComplianceHistory` cmdlet retrieves the history for all compliance audits that have been performed. + +## Examples + +### Example 1 + +```powershell +Get-VCFComplianceHistory + +id : b0762a5f-c575-4e1a-a002-de32e9e9426d +creationTimestamp : 7/30/2024 9:31:45 PM +completionTimestamp : 7/30/2024 9:31:47 PM +standardType : PCI +standardVersion : 4.0 +domainId : 6ca52d6b-9292-4baf-ab97-75c3a74d4bf2 +configurationEvaluationStatus : SOME_EVALUATED +configurationEvaluationStatusDetails : [1605, 1604] configurations were skipped in audit. Follow the audit procedure to run them manually. +compliantStatus : PARTIALLY_COMPLIANT +totalConfigurationsEvaluated : 9 +numberOfNonCompliantConfigurations : 5 +numberOfSkippedConfigurations : 2 +numberOfAuditItems : 9 + +id : e2b165c7-0118-4064-9f41-33639fb37195 +creationTimestamp : 7/30/2024 10:52:31 PM +completionTimestamp : 7/30/2024 10:52:32 PM +standardType : PCI +standardVersion : 4.0 +domainId : 6ca52d6b-9292-4baf-ab97-75c3a74d4bf2 +configurationEvaluationStatus : SOME_EVALUATED +configurationEvaluationStatusDetails : [1605, 1604] configurations were skipped in audit. Follow the audit procedure to run them manually. +compliantStatus : PARTIALLY_COMPLIANT +totalConfigurationsEvaluated : 9 +numberOfNonCompliantConfigurations : 5 +numberOfSkippedConfigurations : 2 +numberOfAuditItems : 9 +``` + +This example shows how to retrieve the history for all compliance audits that have been performed. diff --git a/docs/documentation/functions/compliance/Get-VCFComplianceStandard.md b/docs/documentation/functions/compliance/Get-VCFComplianceStandard.md new file mode 100644 index 000000000..d10942122 --- /dev/null +++ b/docs/documentation/functions/compliance/Get-VCFComplianceStandard.md @@ -0,0 +1,29 @@ +# Get-VCFComplianceStandard + +## Synopsis + +Retrieves the list of all compliance audit standards and versions that are supported. + +## Syntax + +```powershell +Get-VCFComplianceConfiguration +``` + +## Description + +The `Get-VCFComplianceStandard` cmdlet retrieves the the list of all compliance audit standards and versions that are supported. + +## Examples + +### Example 1 + +```powershell +Get-VCFComplianceStandard + +standardType standardVersions +------------ ---------------- +PCI {4.0} +``` + +This example shows how to retrieve a list of all compliance audit standards and versions. diff --git a/docs/documentation/functions/compliance/Get-VCFComplianceTask.md b/docs/documentation/functions/compliance/Get-VCFComplianceTask.md new file mode 100644 index 000000000..2985f7eba --- /dev/null +++ b/docs/documentation/functions/compliance/Get-VCFComplianceTask.md @@ -0,0 +1,67 @@ +# Get-VCFComplianceTask + +## Synopsis + +Retrieves the list of all compliance configurations along with their applicable resource types and versions. + +## Syntax + +```powershell +Get-VCFComplianceTask [-domainName] [-complianceTaskId] [] +``` + +## Description + +The `Get-VCFComplianceTask` cmdlet retrieves the compliance audit id and progress using the task id returned from the `New-VCFCompliance` operation. + +## Examples + +### Example 1 + +```powershell +Get-VCFComplianceTask -domainName "sfo-m01" -complianceTaskId "d22c47e0-8d38-43da-975b-938e7c59f4d6" + +id status complianceAuditId +-- ------ ----------------- +d22c47e0-8d38-43da-975b-938e7c59f4d6 SUCCESSFUL 1758e972-8509-4dce-93d9-a303d7c35a41 +``` + +This example shows how to retrieve the compliance audit id and progress using the task id returned from the `New-VCFCompliance` operation. + +## Parameters + +### -domainName + +Specifies the name of the workload domain. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -complianceTaskId + +Specifies the compliance task returned from `New-VCFCompliance`. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### Common Parameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/compliance/New-VCFCompliance.md b/docs/documentation/functions/compliance/New-VCFCompliance.md new file mode 100644 index 000000000..a1a85334d --- /dev/null +++ b/docs/documentation/functions/compliance/New-VCFCompliance.md @@ -0,0 +1,95 @@ +# New-VCFCompliance + +## Synopsis + +Performs a new compliance audit. + +## Syntax + +```powershell +New-VCFCompliance [-resourceType] [-standardType] [-standardVersion] [-domainName] [] +``` + +## Description + +The `New-VCFWorkloadDomain` cmdlet performs a new compliance audit. + +## Examples + +### Example 1 + +```powershell +New-VCFCompliance -resourceType "SDDC_MANAGER" -standardType "PCI" -standardVersion "4.0" -domainName "sfo-m01" +``` + +This example shows how to perform a new compliance audit. + +## Parameters + +### -resourceType + +Specifies the resource type for the compliance audit. Please use `Get-VCFComplianceConfiguration` to see available options. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -standardType + +Specifies the compliance type for the compliance audit. Please use `Get-VCFComplianceStandard` to see available options. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -standardVersion + +Specifies the compliance version for the compliance audit. Please use `Get-VCFComplianceStandard` to see available options. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -domainName + +Specifies the name of the workload domain. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### Common Parameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/credentials/Get-VCFCredential.md b/docs/documentation/functions/credentials/Get-VCFCredential.md index efce693b5..01277546a 100644 --- a/docs/documentation/functions/credentials/Get-VCFCredential.md +++ b/docs/documentation/functions/credentials/Get-VCFCredential.md @@ -114,4 +114,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/credentials/Get-VCFCredentialExpiry.md b/docs/documentation/functions/credentials/Get-VCFCredentialExpiry.md index 8947aff56..b04483d85 100644 --- a/docs/documentation/functions/credentials/Get-VCFCredentialExpiry.md +++ b/docs/documentation/functions/credentials/Get-VCFCredentialExpiry.md @@ -100,4 +100,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/credentials/Get-VCFCredentialTask.md b/docs/documentation/functions/credentials/Get-VCFCredentialTask.md index abf027db8..f8effbb87 100644 --- a/docs/documentation/functions/credentials/Get-VCFCredentialTask.md +++ b/docs/documentation/functions/credentials/Get-VCFCredentialTask.md @@ -100,4 +100,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/credentials/Restart-VCFCredentialTask.md b/docs/documentation/functions/credentials/Restart-VCFCredentialTask.md index cab748719..f469ebc02 100644 --- a/docs/documentation/functions/credentials/Restart-VCFCredentialTask.md +++ b/docs/documentation/functions/credentials/Restart-VCFCredentialTask.md @@ -60,4 +60,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/credentials/Set-VCFCredential.md b/docs/documentation/functions/credentials/Set-VCFCredential.md index 32065b2c5..8d8d1cd82 100644 --- a/docs/documentation/functions/credentials/Set-VCFCredential.md +++ b/docs/documentation/functions/credentials/Set-VCFCredential.md @@ -68,4 +68,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/credentials/Set-VCFCredentialAutoRotatePolicy.md b/docs/documentation/functions/credentials/Set-VCFCredentialAutoRotatePolicy.md index 9248d897d..5b52d40af 100644 --- a/docs/documentation/functions/credentials/Set-VCFCredentialAutoRotatePolicy.md +++ b/docs/documentation/functions/credentials/Set-VCFCredentialAutoRotatePolicy.md @@ -135,4 +135,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/credentials/Stop-VCFCredentialTask.md b/docs/documentation/functions/credentials/Stop-VCFCredentialTask.md index 136cbd778..2826cf68b 100644 --- a/docs/documentation/functions/credentials/Stop-VCFCredentialTask.md +++ b/docs/documentation/functions/credentials/Stop-VCFCredentialTask.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/depots/Get-VCFDepotCredential.md b/docs/documentation/functions/depots/Get-VCFDepotCredential.md index 4584b9dfc..5d3c3912d 100644 --- a/docs/documentation/functions/depots/Get-VCFDepotCredential.md +++ b/docs/documentation/functions/depots/Get-VCFDepotCredential.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/depots/Set-VCFDepotCredential.md b/docs/documentation/functions/depots/Set-VCFDepotCredential.md index fa79d8c77..11d45e8bf 100644 --- a/docs/documentation/functions/depots/Set-VCFDepotCredential.md +++ b/docs/documentation/functions/depots/Set-VCFDepotCredential.md @@ -84,4 +84,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/dns-ntp/Get-VCFConfigurationDNSValidation.md b/docs/documentation/functions/dns-ntp/Get-VCFConfigurationDNSValidation.md index 1bf551f8d..163cc8d29 100644 --- a/docs/documentation/functions/dns-ntp/Get-VCFConfigurationDNSValidation.md +++ b/docs/documentation/functions/dns-ntp/Get-VCFConfigurationDNSValidation.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/dns-ntp/Get-VCFConfigurationNTPValidation.md b/docs/documentation/functions/dns-ntp/Get-VCFConfigurationNTPValidation.md index 752a0260d..cc273de4e 100644 --- a/docs/documentation/functions/dns-ntp/Get-VCFConfigurationNTPValidation.md +++ b/docs/documentation/functions/dns-ntp/Get-VCFConfigurationNTPValidation.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/dns-ntp/Set-VCFConfigurationDNS.md b/docs/documentation/functions/dns-ntp/Set-VCFConfigurationDNS.md index 7c314cfd0..cb22b602d 100644 --- a/docs/documentation/functions/dns-ntp/Set-VCFConfigurationDNS.md +++ b/docs/documentation/functions/dns-ntp/Set-VCFConfigurationDNS.md @@ -74,4 +74,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/dns-ntp/Set-VCFConfigurationNTP.md b/docs/documentation/functions/dns-ntp/Set-VCFConfigurationNTP.md index 1cd58a415..2e59bf82a 100644 --- a/docs/documentation/functions/dns-ntp/Set-VCFConfigurationNTP.md +++ b/docs/documentation/functions/dns-ntp/Set-VCFConfigurationNTP.md @@ -74,4 +74,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/domains/Get-VCFWorkloadDomain.md b/docs/documentation/functions/domains/Get-VCFWorkloadDomain.md index 8f1cc9591..ea39d30fd 100644 --- a/docs/documentation/functions/domains/Get-VCFWorkloadDomain.md +++ b/docs/documentation/functions/domains/Get-VCFWorkloadDomain.md @@ -100,4 +100,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/domains/New-VCFWorkloadDomain.md b/docs/documentation/functions/domains/New-VCFWorkloadDomain.md index 8b0be748a..94786da9b 100644 --- a/docs/documentation/functions/domains/New-VCFWorkloadDomain.md +++ b/docs/documentation/functions/domains/New-VCFWorkloadDomain.md @@ -79,4 +79,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/domains/Remove-VCFWorkloadDomain.md b/docs/documentation/functions/domains/Remove-VCFWorkloadDomain.md index 8d685ab9c..f5d3e7d42 100644 --- a/docs/documentation/functions/domains/Remove-VCFWorkloadDomain.md +++ b/docs/documentation/functions/domains/Remove-VCFWorkloadDomain.md @@ -49,4 +49,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/domains/Set-VCFWorkloadDomain.md b/docs/documentation/functions/domains/Set-VCFWorkloadDomain.md index c0207e153..dd71336ce 100644 --- a/docs/documentation/functions/domains/Set-VCFWorkloadDomain.md +++ b/docs/documentation/functions/domains/Set-VCFWorkloadDomain.md @@ -49,4 +49,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/federation/Get-VCFFederationTask.md b/docs/documentation/functions/federation/Get-VCFFederationTask.md index a55841fdf..5694df95c 100644 --- a/docs/documentation/functions/federation/Get-VCFFederationTask.md +++ b/docs/documentation/functions/federation/Get-VCFFederationTask.md @@ -48,4 +48,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/federation/Join-VCFFederation.md b/docs/documentation/functions/federation/Join-VCFFederation.md index ed6459f07..25d94c5e2 100644 --- a/docs/documentation/functions/federation/Join-VCFFederation.md +++ b/docs/documentation/functions/federation/Join-VCFFederation.md @@ -54,4 +54,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/federation/New-VCFFederationInvite.md b/docs/documentation/functions/federation/New-VCFFederationInvite.md index 4eae5eb6e..03095cde4 100644 --- a/docs/documentation/functions/federation/New-VCFFederationInvite.md +++ b/docs/documentation/functions/federation/New-VCFFederationInvite.md @@ -64,4 +64,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/federation/Set-VCFFederation.md b/docs/documentation/functions/federation/Set-VCFFederation.md index f47430d18..b0f1b4595 100644 --- a/docs/documentation/functions/federation/Set-VCFFederation.md +++ b/docs/documentation/functions/federation/Set-VCFFederation.md @@ -54,4 +54,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/hosts/Get-VCFHost.md b/docs/documentation/functions/hosts/Get-VCFHost.md index d563433a0..85160737a 100644 --- a/docs/documentation/functions/hosts/Get-VCFHost.md +++ b/docs/documentation/functions/hosts/Get-VCFHost.md @@ -124,4 +124,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/hosts/New-VCFCommissionedHost.md b/docs/documentation/functions/hosts/New-VCFCommissionedHost.md index be5980eb5..8b1cb334c 100644 --- a/docs/documentation/functions/hosts/New-VCFCommissionedHost.md +++ b/docs/documentation/functions/hosts/New-VCFCommissionedHost.md @@ -80,4 +80,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/hosts/Remove-VCFCommissionedHost.md b/docs/documentation/functions/hosts/Remove-VCFCommissionedHost.md index 5bdcc1890..a219c11b5 100644 --- a/docs/documentation/functions/hosts/Remove-VCFCommissionedHost.md +++ b/docs/documentation/functions/hosts/Remove-VCFCommissionedHost.md @@ -50,4 +50,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/iam/Get-VCFUser.md b/docs/documentation/functions/iam/Get-VCFUser.md index ab97991ff..24aa3fb1c 100644 --- a/docs/documentation/functions/iam/Get-VCFUser.md +++ b/docs/documentation/functions/iam/Get-VCFUser.md @@ -92,4 +92,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/iam/New-VCFGroup.md b/docs/documentation/functions/iam/New-VCFGroup.md index 0150a3ee5..54b496387 100644 --- a/docs/documentation/functions/iam/New-VCFGroup.md +++ b/docs/documentation/functions/iam/New-VCFGroup.md @@ -76,4 +76,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/iam/New-VCFServiceUser.md b/docs/documentation/functions/iam/New-VCFServiceUser.md index 3f3148f81..6ae5aec39 100644 --- a/docs/documentation/functions/iam/New-VCFServiceUser.md +++ b/docs/documentation/functions/iam/New-VCFServiceUser.md @@ -60,4 +60,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/iam/New-VCFUser.md b/docs/documentation/functions/iam/New-VCFUser.md index 8b164f4b6..7b02bd6b6 100644 --- a/docs/documentation/functions/iam/New-VCFUser.md +++ b/docs/documentation/functions/iam/New-VCFUser.md @@ -60,4 +60,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/iam/Remove-VCFUser.md b/docs/documentation/functions/iam/Remove-VCFUser.md index 99c490f77..e258bc714 100644 --- a/docs/documentation/functions/iam/Remove-VCFUser.md +++ b/docs/documentation/functions/iam/Remove-VCFUser.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/idp/Get-VCFIdentityProvider.md b/docs/documentation/functions/idp/Get-VCFIdentityProvider.md index c6298084d..d94d37de7 100644 --- a/docs/documentation/functions/idp/Get-VCFIdentityProvider.md +++ b/docs/documentation/functions/idp/Get-VCFIdentityProvider.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/idp/New-VCFIdentityProvider.md b/docs/documentation/functions/idp/New-VCFIdentityProvider.md index 33e4a163c..af9e94b96 100644 --- a/docs/documentation/functions/idp/New-VCFIdentityProvider.md +++ b/docs/documentation/functions/idp/New-VCFIdentityProvider.md @@ -80,4 +80,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/idp/Remove-VCFIdentityProvider.md b/docs/documentation/functions/idp/Remove-VCFIdentityProvider.md index c772036bc..80bd3bcc2 100644 --- a/docs/documentation/functions/idp/Remove-VCFIdentityProvider.md +++ b/docs/documentation/functions/idp/Remove-VCFIdentityProvider.md @@ -68,4 +68,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/idp/Update-VCFIdentityProvider.md b/docs/documentation/functions/idp/Update-VCFIdentityProvider.md index 5bb794080..8143e43e4 100644 --- a/docs/documentation/functions/idp/Update-VCFIdentityProvider.md +++ b/docs/documentation/functions/idp/Update-VCFIdentityProvider.md @@ -84,4 +84,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/licenses/Get-VCFLicenseKey.md b/docs/documentation/functions/licenses/Get-VCFLicenseKey.md index 439c3a76e..1b3ba78bc 100644 --- a/docs/documentation/functions/licenses/Get-VCFLicenseKey.md +++ b/docs/documentation/functions/licenses/Get-VCFLicenseKey.md @@ -100,4 +100,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/licenses/New-VCFLicenseKey.md b/docs/documentation/functions/licenses/New-VCFLicenseKey.md index 4ab5fce42..15f13f304 100644 --- a/docs/documentation/functions/licenses/New-VCFLicenseKey.md +++ b/docs/documentation/functions/licenses/New-VCFLicenseKey.md @@ -76,4 +76,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/licenses/Remove-VCFLicenseKey.md b/docs/documentation/functions/licenses/Remove-VCFLicenseKey.md index ff122994d..0ecb212d0 100644 --- a/docs/documentation/functions/licenses/Remove-VCFLicenseKey.md +++ b/docs/documentation/functions/licenses/Remove-VCFLicenseKey.md @@ -48,4 +48,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/network-pools/Add-VCFNetworkIPPool.md b/docs/documentation/functions/network-pools/Add-VCFNetworkIPPool.md index 484ecaea9..91046b08a 100644 --- a/docs/documentation/functions/network-pools/Add-VCFNetworkIPPool.md +++ b/docs/documentation/functions/network-pools/Add-VCFNetworkIPPool.md @@ -92,4 +92,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/network-pools/Get-VCFNetworkIPPool.md b/docs/documentation/functions/network-pools/Get-VCFNetworkIPPool.md index 76416530a..fac64d388 100644 --- a/docs/documentation/functions/network-pools/Get-VCFNetworkIPPool.md +++ b/docs/documentation/functions/network-pools/Get-VCFNetworkIPPool.md @@ -68,4 +68,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/network-pools/Get-VCFNetworkPool.md b/docs/documentation/functions/network-pools/Get-VCFNetworkPool.md index 34c0282f3..fa0a96a0b 100644 --- a/docs/documentation/functions/network-pools/Get-VCFNetworkPool.md +++ b/docs/documentation/functions/network-pools/Get-VCFNetworkPool.md @@ -76,4 +76,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/network-pools/New-VCFNetworkPool.md b/docs/documentation/functions/network-pools/New-VCFNetworkPool.md index 2a5ce5a64..ec9540688 100644 --- a/docs/documentation/functions/network-pools/New-VCFNetworkPool.md +++ b/docs/documentation/functions/network-pools/New-VCFNetworkPool.md @@ -50,4 +50,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/network-pools/Remove-VCFNetworkIPPool.md b/docs/documentation/functions/network-pools/Remove-VCFNetworkIPPool.md index 22ab5324e..902d21dd1 100644 --- a/docs/documentation/functions/network-pools/Remove-VCFNetworkIPPool.md +++ b/docs/documentation/functions/network-pools/Remove-VCFNetworkIPPool.md @@ -92,4 +92,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/network-pools/Remove-VCFNetworkPool.md b/docs/documentation/functions/network-pools/Remove-VCFNetworkPool.md index a61bdad1e..823d772f2 100644 --- a/docs/documentation/functions/network-pools/Remove-VCFNetworkPool.md +++ b/docs/documentation/functions/network-pools/Remove-VCFNetworkPool.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/nsx/nsx-edge-clusters/Get-VCFEdgeCluster.md b/docs/documentation/functions/nsx/nsx-edge-clusters/Get-VCFEdgeCluster.md index 3db5f2d47..9cef3fb5b 100644 --- a/docs/documentation/functions/nsx/nsx-edge-clusters/Get-VCFEdgeCluster.md +++ b/docs/documentation/functions/nsx/nsx-edge-clusters/Get-VCFEdgeCluster.md @@ -56,4 +56,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/nsx/nsx-edge-clusters/New-VCFEdgeCluster.md b/docs/documentation/functions/nsx/nsx-edge-clusters/New-VCFEdgeCluster.md index c79a4e53b..e65e887f0 100644 --- a/docs/documentation/functions/nsx/nsx-edge-clusters/New-VCFEdgeCluster.md +++ b/docs/documentation/functions/nsx/nsx-edge-clusters/New-VCFEdgeCluster.md @@ -78,4 +78,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/nsx/nsx-managers/Get-VCFNsxtCluster.md b/docs/documentation/functions/nsx/nsx-managers/Get-VCFNsxtCluster.md index 4e9ffc755..765550cab 100644 --- a/docs/documentation/functions/nsx/nsx-managers/Get-VCFNsxtCluster.md +++ b/docs/documentation/functions/nsx/nsx-managers/Get-VCFNsxtCluster.md @@ -64,4 +64,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/other/Invoke-VCFCommand.md b/docs/documentation/functions/other/Invoke-VCFCommand.md index 9dcf10a73..9a9d519f6 100644 --- a/docs/documentation/functions/other/Invoke-VCFCommand.md +++ b/docs/documentation/functions/other/Invoke-VCFCommand.md @@ -124,4 +124,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/personalities/Get-VCFPersonality.md b/docs/documentation/functions/personalities/Get-VCFPersonality.md index a0151aa44..1c7fe7c28 100644 --- a/docs/documentation/functions/personalities/Get-VCFPersonality.md +++ b/docs/documentation/functions/personalities/Get-VCFPersonality.md @@ -77,4 +77,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/personalities/New-VCFPersonality.md b/docs/documentation/functions/personalities/New-VCFPersonality.md index 18f0cc42b..ee5effb8f 100644 --- a/docs/documentation/functions/personalities/New-VCFPersonality.md +++ b/docs/documentation/functions/personalities/New-VCFPersonality.md @@ -76,4 +76,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/pscs/Get-VCFPSC.md b/docs/documentation/functions/pscs/Get-VCFPSC.md index 7a732005d..ae5a73afc 100644 --- a/docs/documentation/functions/pscs/Get-VCFPSC.md +++ b/docs/documentation/functions/pscs/Get-VCFPSC.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/releases/Get-VCFRelease.md b/docs/documentation/functions/releases/Get-VCFRelease.md index 4f072068c..bbb9c8daa 100644 --- a/docs/documentation/functions/releases/Get-VCFRelease.md +++ b/docs/documentation/functions/releases/Get-VCFRelease.md @@ -256,4 +256,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sddc-managers/Get-VCFManager.md b/docs/documentation/functions/sddc-managers/Get-VCFManager.md index 0128b3492..4775b42b6 100644 --- a/docs/documentation/functions/sddc-managers/Get-VCFManager.md +++ b/docs/documentation/functions/sddc-managers/Get-VCFManager.md @@ -124,4 +124,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sddc/Get-CloudBuilderSDDC.md b/docs/documentation/functions/sddc/Get-CloudBuilderSDDC.md index 8040e643b..f46fac683 100644 --- a/docs/documentation/functions/sddc/Get-CloudBuilderSDDC.md +++ b/docs/documentation/functions/sddc/Get-CloudBuilderSDDC.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sddc/Get-CloudBuilderSDDCValidation.md b/docs/documentation/functions/sddc/Get-CloudBuilderSDDCValidation.md index 72ef9964c..338f509e3 100644 --- a/docs/documentation/functions/sddc/Get-CloudBuilderSDDCValidation.md +++ b/docs/documentation/functions/sddc/Get-CloudBuilderSDDCValidation.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sddc/Restart-CloudBuilderSDDC.md b/docs/documentation/functions/sddc/Restart-CloudBuilderSDDC.md index 31bbe19f3..aee4366c1 100644 --- a/docs/documentation/functions/sddc/Restart-CloudBuilderSDDC.md +++ b/docs/documentation/functions/sddc/Restart-CloudBuilderSDDC.md @@ -68,4 +68,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sddc/Restart-CloudBuilderSDDCValidation.md b/docs/documentation/functions/sddc/Restart-CloudBuilderSDDCValidation.md index fd1fe2075..8142f6fd0 100644 --- a/docs/documentation/functions/sddc/Restart-CloudBuilderSDDCValidation.md +++ b/docs/documentation/functions/sddc/Restart-CloudBuilderSDDCValidation.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sddc/Start-CloudBuilderSDDC.md b/docs/documentation/functions/sddc/Start-CloudBuilderSDDC.md index 298aae792..461f2bcd2 100644 --- a/docs/documentation/functions/sddc/Start-CloudBuilderSDDC.md +++ b/docs/documentation/functions/sddc/Start-CloudBuilderSDDC.md @@ -56,4 +56,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sddc/Start-CloudBuilderSDDCValidation.md b/docs/documentation/functions/sddc/Start-CloudBuilderSDDCValidation.md index a5cc58cb2..17bac60d7 100644 --- a/docs/documentation/functions/sddc/Start-CloudBuilderSDDCValidation.md +++ b/docs/documentation/functions/sddc/Start-CloudBuilderSDDCValidation.md @@ -68,4 +68,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sddc/Stop-CloudBuilderSDDCValidation.md b/docs/documentation/functions/sddc/Stop-CloudBuilderSDDCValidation.md index 766d5d89b..34c580eec 100644 --- a/docs/documentation/functions/sddc/Stop-CloudBuilderSDDCValidation.md +++ b/docs/documentation/functions/sddc/Stop-CloudBuilderSDDCValidation.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/services/Get-VCFService.md b/docs/documentation/functions/services/Get-VCFService.md index ec5ad6f6d..4c3db3db4 100644 --- a/docs/documentation/functions/services/Get-VCFService.md +++ b/docs/documentation/functions/services/Get-VCFService.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sos/Get-VCFHealthSummaryTask.md b/docs/documentation/functions/sos/Get-VCFHealthSummaryTask.md index d7adec3c9..c4af95e96 100644 --- a/docs/documentation/functions/sos/Get-VCFHealthSummaryTask.md +++ b/docs/documentation/functions/sos/Get-VCFHealthSummaryTask.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sos/Get-VCFSupportBundleTask.md b/docs/documentation/functions/sos/Get-VCFSupportBundleTask.md index 979a3f13d..61cae0be7 100644 --- a/docs/documentation/functions/sos/Get-VCFSupportBundleTask.md +++ b/docs/documentation/functions/sos/Get-VCFSupportBundleTask.md @@ -51,4 +51,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sos/Request-VCFHealthSummaryBundle.md b/docs/documentation/functions/sos/Request-VCFHealthSummaryBundle.md index 99f497b25..99bfc1dff 100644 --- a/docs/documentation/functions/sos/Request-VCFHealthSummaryBundle.md +++ b/docs/documentation/functions/sos/Request-VCFHealthSummaryBundle.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sos/Request-VCFSupportBundle.md b/docs/documentation/functions/sos/Request-VCFSupportBundle.md index 5880adf5e..9b0af0a96 100644 --- a/docs/documentation/functions/sos/Request-VCFSupportBundle.md +++ b/docs/documentation/functions/sos/Request-VCFSupportBundle.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sos/Start-VCFHealthSummary.md b/docs/documentation/functions/sos/Start-VCFHealthSummary.md index bc0499c93..3cedeeb4a 100644 --- a/docs/documentation/functions/sos/Start-VCFHealthSummary.md +++ b/docs/documentation/functions/sos/Start-VCFHealthSummary.md @@ -50,4 +50,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/sos/Start-VCFSupportBundle.md b/docs/documentation/functions/sos/Start-VCFSupportBundle.md index 38db07c9c..efd501ee3 100644 --- a/docs/documentation/functions/sos/Start-VCFSupportBundle.md +++ b/docs/documentation/functions/sos/Start-VCFSupportBundle.md @@ -49,4 +49,4 @@ Accept wildcard characters: False ``` ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/system-prechecks/Get-VCFSystemPrecheckTask.md b/docs/documentation/functions/system-prechecks/Get-VCFSystemPrecheckTask.md index 1531d7dcb..c3570e1fe 100644 --- a/docs/documentation/functions/system-prechecks/Get-VCFSystemPrecheckTask.md +++ b/docs/documentation/functions/system-prechecks/Get-VCFSystemPrecheckTask.md @@ -66,4 +66,4 @@ Accept wildcard characters: False ``` ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/system-prechecks/Start-VCFSystemPrecheck.md b/docs/documentation/functions/system-prechecks/Start-VCFSystemPrecheck.md index 6cee42b46..6fc45b7f9 100644 --- a/docs/documentation/functions/system-prechecks/Start-VCFSystemPrecheck.md +++ b/docs/documentation/functions/system-prechecks/Start-VCFSystemPrecheck.md @@ -50,4 +50,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/tasks/Get-VCFTask.md b/docs/documentation/functions/tasks/Get-VCFTask.md index 3225113f0..25c0a5787 100644 --- a/docs/documentation/functions/tasks/Get-VCFTask.md +++ b/docs/documentation/functions/tasks/Get-VCFTask.md @@ -76,4 +76,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/tasks/Restart-VCFTask.md b/docs/documentation/functions/tasks/Restart-VCFTask.md index 689801bea..e24bf25e4 100644 --- a/docs/documentation/functions/tasks/Restart-VCFTask.md +++ b/docs/documentation/functions/tasks/Restart-VCFTask.md @@ -44,4 +44,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/upgrades/Get-VCFUpgrade.md b/docs/documentation/functions/upgrades/Get-VCFUpgrade.md index 5b0c3b0a0..55efaf37c 100644 --- a/docs/documentation/functions/upgrades/Get-VCFUpgrade.md +++ b/docs/documentation/functions/upgrades/Get-VCFUpgrade.md @@ -52,4 +52,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/upgrades/Start-VCFUpgrade.md b/docs/documentation/functions/upgrades/Start-VCFUpgrade.md index bd28cbdd5..08f6aed87 100644 --- a/docs/documentation/functions/upgrades/Start-VCFUpgrade.md +++ b/docs/documentation/functions/upgrades/Start-VCFUpgrade.md @@ -51,4 +51,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/documentation/functions/vcenters/Get-VCFvCenter.md b/docs/documentation/functions/vcenters/Get-VCFvCenter.md index 5235022d5..28067601f 100644 --- a/docs/documentation/functions/vcenters/Get-VCFvCenter.md +++ b/docs/documentation/functions/vcenters/Get-VCFvCenter.md @@ -84,4 +84,4 @@ Accept wildcard characters: False ### Common Parameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/mkdocs.yml b/mkdocs.yml index 8deac3278..64eef57a5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -23,7 +23,7 @@ theme: logo: assets/images/icon-white.svg icon: repo: fontawesome/brands/github - palette: + palette: - media: "(prefers-color-scheme: light)" scheme: default primary: indigo @@ -126,7 +126,7 @@ markdown_extensions: # Navigation nav: -- Getting Started: +- Getting Started: - index.md - Installation: documentation/getting-started/install.md - Updating: documentation/getting-started/update.md @@ -137,7 +137,7 @@ nav: - License: license.md - Reference: - documentation/index.md - - Application Virtual Networks: + - Application Virtual Networks: - documentation/functions/avns/Add-VCFApplicationVirtualNetwork.md - documentation/functions/avns/Get-VCFApplicationVirtualNetwork.md - Authentication: @@ -179,6 +179,13 @@ nav: - documentation/functions/clusters/New-VCFCluster.md - documentation/functions/clusters/Remove-VCFCluster.md - documentation/functions/clusters/Set-VCFCluster.md + - Compliance: + - documentation/functions/compliance/Get-VCFCompliance.md + - documentation/functions/compliance/Get-VCFComplianceConfiguration.md + - documentation/functions/compliance/Get-VCFComplianceHistory.md + - documentation/functions/compliance/Get-VCFComplianceStandard.md + - documentation/functions/compliance/Get-VCFComplianceTask.md + - documentation/functions/compliance/New-VCFCompliance.md - Credentials: - documentation/functions/credentials/Get-VCFCredential.md - documentation/functions/credentials/Get-VCFCredentialExpiry.md From a55e7442ff8eba6cb454406e5fccc619343ef215 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:39:51 -0400 Subject: [PATCH 24/33] chore(deps): bump actions/setup-python from 5.1.1 to 5.2.0 (#292) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.1 to 5.2.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/39cd14951b08e74b54015e9e001cdefcf80e669f...f677139bbe7f9c59b41e40162b753c062f5d49a3) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a978532bd..7c1924477 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: 3.x - name: Install Dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8f5ae42c..bffe3ebab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,7 +136,7 @@ jobs: ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: 3.x - name: Install Dependencies From 1b5f01b34d6664c67ac01885788b15b4796a9e3e Mon Sep 17 00:00:00 2001 From: Erik <20067955+erikgraa@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:14:50 +0200 Subject: [PATCH 25/33] feat: add pscredential and securestring (#283) Enhanced `Request-VCFToken` and `Connect-CloudBuilder` by adding a `PSCredential `parameter set and adding support for `SecureString` or PSCredential object for the `password` parameter. Signed-off-by: Erik Grina Raassum Co-authored-by: Ryan Johnson --- PowerVCF.psd1 | 2 +- PowerVCF.psm1 | 149 ++++++++++++++---- .../authentication/Connect-CloudBuilder.md | 68 +++++++- .../authentication/Request-VCFToken.md | 62 ++++++-- 4 files changed, 232 insertions(+), 49 deletions(-) diff --git a/PowerVCF.psd1 b/PowerVCF.psd1 index 3fc099fb5..4101c4bb8 100644 --- a/PowerVCF.psd1 +++ b/PowerVCF.psd1 @@ -11,7 +11,7 @@ RootModule = 'PowerVCF.psm1' # Version number of this module. - ModuleVersion = '2.5.0.1015' + ModuleVersion = '2.5.0.1016' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index df6c01ee6..635baa2b9 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -37,7 +37,7 @@ if ($PSEdition -eq 'Desktop') { #Region Global Variables -Set-Variable -Name msgVcfApiNotAvailable -Value "This API is not available in the latest versions of VMware Cloud Foundation.:" -Scope Global +Set-Variable -Name msgVcfApiNotAvailable -Value "This API is not available in the latest versions of VMware Cloud Foundation:" -Scope Global Set-Variable -Name msgVcfApiNotSupported -Value "This API is not supported on this version of VMware Cloud Foundation:" -Scope Global Set-Variable -Name msgVcfApiDeprecated -Value "This API is deprecated on this version of VMware Cloud Foundation:" -Scope Global @@ -55,11 +55,25 @@ Function Request-VCFToken { .EXAMPLE Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username administrator@vsphere.local -password VMw@re1! - This example shows how to connect to SDDC Manager to request API access and refresh tokens. + This example shows how to connect to SDDC Manager using a clear-text username and password. .EXAMPLE - Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username admin@local -password VMw@re1!VMw@re1! - This example shows how to connect to SDDC Manager using local account admin@local. + $secureString = Read-Host -AsSecureString 'Password' + Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username admin@local -password $secureString + This example shows how to connect to the SDDC Manager instance using a SecureString password. + + .EXAMPLE + $credential = Get-Credential + Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -credential $credential + This example shows how to connect to the SDDC Manager instance using a PSCredential object. + + .EXAMPLE + Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username admin@local + This example shows how to connect to the SDDC Manager instance where the user will be prompted for a password. + + .EXAMPLE + Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io + This example shows how to connect to the SDDC Manager instance where the user will be prompted for a username and password. .PARAMETER fqdn The fully qualified domain name of the SDDC Manager instance. @@ -69,22 +83,49 @@ Function Request-VCFToken { .PARAMETER password The password to authenticate to the SDDC Manager instance. + This parameter takes either a string or a SecureString value. + If not specified, the user will be prompted for the SecureString value. + + .PARAMETER credential + Specifies to authenticate to the SDDC Manager instance using a PSCredential object. .PARAMETER skipCertificateCheck Switch to skip certificate check when connecting to the SDDC Manager instance. #> + [CmdletBinding(DefaultParameterSetName = 'PSCredentialSet')] + Param ( - [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$fqdn, - [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$username, - [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$password, + [Parameter (Mandatory = $true, ParameterSetName = 'UserNameAndPasswordSet')] + [Parameter (Mandatory = $true, ParameterSetName = 'PSCredentialSet')] [ValidateNotNullOrEmpty()] [string]$fqdn, + [Parameter (Mandatory = $true, ParameterSetName = 'UserNameAndPasswordSet')] [ValidateNotNullOrEmpty()] [string]$username, + [Parameter (Mandatory = $false, ParameterSetName = 'UserNameAndPasswordSet')][ValidateNotNullOrEmpty()] [Object]$password, + [Parameter (Mandatory = $true, ParameterSetName = 'PSCredentialSet')] [System.Management.Automation.PSCredential] [System.Management.Automation.Credential()]$credential, [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [Switch]$skipCertificateCheck ) - if ( -not $PsBoundParameters.ContainsKey("username") -or ( -not $PsBoundParameters.ContainsKey("password"))) { - $creds = Get-Credential # Request Credentials - $username = $creds.UserName.ToString() - $password = $creds.GetNetworkCredential().password + try { + if ($PSCmdlet.ParameterSetName -eq 'UserNameAndPasswordSet') { + $user = $UserName + + if (-not($PSBoundParameters.ContainsKey('password'))) { + $password = Read-Host -AsSecureString 'Password' + $decryptedPassword = [Runtime.InteropServices.Marshal]::PtrToStringBSTR([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) + } elseif ($password -isnot [SecureString]) { + if ($password -isnot [System.String]) { + throw 'Password should either be a String or SecureString (recommended).' + } else { + $decryptedPassword = $password + } + } else { + $decryptedPassword = [Runtime.InteropServices.Marshal]::PtrToStringBSTR([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) + } + } elseif ($PSCmdlet.ParameterSetName -eq 'PSCredentialSet') { + $user = $Credential.UserName + $decryptedPassword = $Credential.GetNetworkCredential().Password + } + } catch { + $PSCmdlet.ThrowTerminatingError($_) } if ($PsBoundParameters.ContainsKey("skipCertificateCheck")) { @@ -112,13 +153,13 @@ public static class Placeholder { $Global:sddcManager = $fqdn $headers = @{"Content-Type" = "application/json" } - $uri = "https://$sddcManager/v1/tokens" # Set URI for executing an API call to validate authentication - $body = '{"username": "' + $username + '","password": "' + $password + '"}' + $uri = "https://$sddcManager/v1/tokens" + $body = '{"username": "' + $user + '","password": "' + $decryptedPassword + '"}' Try { # Checking authentication with SDDC Manager if ($PSEdition -eq 'Core') { - $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -Body $body -SkipCertificateCheck # PS Core has -SkipCertificateCheck implemented + $response = Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -Body $body -SkipCertificateCheck $Global:accessToken = $response.accessToken $Global:refreshToken = $response.refreshToken.id } else { @@ -145,8 +186,26 @@ Function Connect-CloudBuilder { credentials in a base64 string. .EXAMPLE - Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin -password VMware1! - This example shows how to connect to the VMware Cloud Builder instance. + Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin -password VMw@re1! + This example shows how to connect to the VMware Cloud Builder instance using a clear-text username and password. + + .EXAMPLE + $secureString = Read-Host -AsSecureString 'Password' + Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin -password $secureString + This example shows how to connect to the specified VMware Cloud Builder instance using a SecureString password. + + .EXAMPLE + $credential = Get-Credential + Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -credential $credential + This example shows how to connect to the specified VMware Cloud Builder instance using a PSCredential object. + + .EXAMPLE + Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin + This example shows how to connect to the specified VMware Cloud Builder instance where the user will be prompted for a password. + + .EXAMPLE + Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io + This example shows how to connect to the specified VMware Cloud Builder instance where the user will be prompted for a username and password. .PARAMETER fqdn The fully qualified domain name of the VMware Cloud Builder instance. @@ -156,22 +215,50 @@ Function Connect-CloudBuilder { .PARAMETER password The password to authenticate to the VMware Cloud Builder instance. + This parameter takes either a string or a SecureString value. + If not specified, the user will be prompted for the SecureString value. + + .PARAMETER credential + Specifies a user account to authenticate to the SDDC Manager instance using a PSCredential object. .PARAMETER skipCertificateCheck Switch to skip certificate check when connecting to the VMware Cloud Builder instance. #> + [CmdletBinding(DefaultParameterSetName = 'PSCredentialSet')] + Param ( - [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$fqdn, - [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$username, - [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [String]$password, + [Parameter (Mandatory = $true, ParameterSetName = 'UserNameAndPasswordSet')] + [Parameter (Mandatory = $true, ParameterSetName = 'PSCredentialSet')] [ValidateNotNullOrEmpty()] [string]$fqdn, + [Parameter (Mandatory = $true, ParameterSetName = 'UserNameAndPasswordSet')] [ValidateNotNullOrEmpty()] [string]$username, + [Parameter (Mandatory = $false, ParameterSetName = 'UserNameAndPasswordSet')] [ValidateNotNullOrEmpty()] [Object]$password, + [Parameter (Mandatory = $true, ParameterSetName = 'PSCredentialSet')] + [System.Management.Automation.PSCredential] [System.Management.Automation.Credential()]$credential, [Parameter (Mandatory = $false)] [ValidateNotNullOrEmpty()] [Switch]$skipCertificateCheck ) - if ( -not $PsBoundParameters.ContainsKey("username") -or ( -not $PsBoundParameters.ContainsKey("password"))) { - $creds = Get-Credential # Request Credentials - $username = $creds.UserName.ToString() - $password = $creds.GetNetworkCredential().password + try { + if ($PSCmdlet.ParameterSetName -eq 'UserNameAndPasswordSet') { + $user = $username + + if (-not($PSBoundParameters.ContainsKey('password'))) { + $Password = Read-Host -AsSecureString 'Password' + $decryptedPassword = [Runtime.InteropServices.Marshal]::PtrToStringBSTR([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) + } elseif ($password -isnot [SecureString]) { + if ($password -isnot [System.String]) { + throw 'Password should either be a String or SecureString (recommended).' + } else { + $decryptedPassword = $password + } + } else { + $decryptedPassword = [Runtime.InteropServices.Marshal]::PtrToStringBSTR([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) + } + } elseif ($PSCmdlet.ParameterSetName -eq 'PSCredentialSet') { + $user = $Credential.UserName + $decryptedPassword = $Credential.GetNetworkCredential().Password + } + } catch { + $PSCmdlet.ThrowTerminatingError($_) } if ($PsBoundParameters.ContainsKey("skipCertificateCheck")) { @@ -198,21 +285,21 @@ public static class Placeholder { } $Global:cloudBuilder = $fqdn - $Global:base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username, $password))) # Create Basic Authentication Encoded Credentials + $Global:base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user, $decryptedPassword))) # Create Basic Authentication Encoded Credentials $headers = @{"Accept" = "application/json" } $headers.Add("Authorization", "Basic $base64AuthInfo") - $uri = "https://$cloudBuilder/v1/sddcs" # Set URI for executing an API call to validate authentication + $uri = "https://$cloudBuilder/v1/sddcs" Try { - # Checking authentication with VMware Cloud Builder + # Checking authentication with VMware Cloud Builder. if ($PSEdition -eq 'Core') { - $response = Invoke-WebRequest -Method GET -Uri $uri -Headers $headers -SkipCertificateCheck # PS Core has -SkipCertificateCheck implemented + $response = Invoke-WebRequest -Method GET -Uri $uri -Headers $headers -SkipCertificateCheck } else { $response = Invoke-WebRequest -Method GET -Uri $uri -Headers $headers } if ($response.StatusCode -eq 200) { - Write-Output "Successfully connected to the Cloud Builder Appliance: $cloudBuilder" + Write-Output "Successfully connected to the Cloud Builder appliance: $cloudBuilder" } } Catch { ResponseException -object $_ @@ -6379,7 +6466,7 @@ Function ResponseException { Write-Host "Script File: $($object.InvocationInfo.ScriptName) Line: $($object.InvocationInfo.ScriptLineNumber)" -ForegroundColor Red Write-Host "Relevant Command: $($object.InvocationInfo.Line.trim())" -ForegroundColor Red Write-Host "Target Uri: $($object.TargetObject.RequestUri.AbsoluteUri)" -ForegroundColor Red - if($body -ne $null -and $body -ne "") { + if ($body -ne $null -and $body -ne "") { Write-Host "Target Payload: $body" -ForegroundColor Red } Write-Host "Exception Message: $($object.Exception.Message)" -ForegroundColor Red @@ -6388,8 +6475,8 @@ Function ResponseException { Function createHeader { $Global:headers = @{ - "Accept" = "application/json" - "Content-Type" = "application/json" + "Accept" = "application/json" + "Content-Type" = "application/json" "Authorization" = "Bearer $accessToken" } } diff --git a/docs/documentation/functions/authentication/Connect-CloudBuilder.md b/docs/documentation/functions/authentication/Connect-CloudBuilder.md index 629cc036e..be53cfb15 100644 --- a/docs/documentation/functions/authentication/Connect-CloudBuilder.md +++ b/docs/documentation/functions/authentication/Connect-CloudBuilder.md @@ -7,7 +7,7 @@ Requests an authentication token from a VMware Cloud Builder instance. ## Syntax ```powershell -Connect-CloudBuilder [-fqdn] [[-username] ] [[-password] ] [-skipCertificateCheck] [] +Connect-CloudBuilder [-fqdn] [[-username] ] [[-password] ] [[-credential] ] [-skipCertificateCheck] [] ``` ## Description @@ -23,10 +23,44 @@ The `Connect-CloudBuilder` cmdlet connects to the specified VMware Cloud Builder ### Example 1 ```powershell -Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin -password VMware1! +Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin -password VMw@re1! ``` -This example shows how to connect to the VMware Cloud Builder instance. +This example shows how to connect to the specified VMware Cloud Builder instance using a clear-text username and password. + +### Example 2 + +```powershell +$secureString = Read-Host -AsSecureString 'Password' +Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin -password $secureString +``` + +This example shows how to connect to the specified VMware Cloud Builder instance using a `SecureString` password. + +### Example 3 + +```powershell +$credential = Get-Credential +Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -credential $credential +``` + +This example shows how to connect to the specified VMware Cloud Builder instance using a PSCredential. + +### Example 4 + +```powershell +Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io -username admin +``` + +This example shows how to connect to the specified VMware Cloud Builder instance where the user will be prompted for a password. + +### Example 5 + +```powershell +Connect-CloudBuilder -fqdn sfo-cb01.sfo.rainpole.io +``` + +This example shows how to connect to the specified VMware Cloud Builder instance where the user will be prompted for a username and password. ## Parameters @@ -36,7 +70,7 @@ The fully qualified domain name of the VMware Cloud Builder instance. ```yaml Type: String -Parameter Sets: (All) +Parameter Sets: PSCredentialSet, UserNameAndPasswordSet Aliases: Required: True @@ -52,10 +86,10 @@ The username to authenticate to the VMware Cloud Builder instance. ```yaml Type: String -Parameter Sets: (All) +Parameter Sets: UserNameAndPasswordSet Aliases: -Required: False +Required: True Position: 2 Default value: None Accept pipeline input: False @@ -64,11 +98,13 @@ Accept wildcard characters: False ### -password -The password to authenticate to the VMware Cloud Builder instance. +The password to authenticate to the VMware Cloud Builder instance. This parameter takes either a string or a `SecureString` value. + +If not specified, the user will be prompted for the `SecureString` value. ```yaml Type: String -Parameter Sets: (All) +Parameter Sets: UserNameAndPasswordSet Aliases: Required: False @@ -78,6 +114,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -credential + +Specifies to authenticate to the SDDC Manager instance using a PSCredential object. + +```yaml +Type: PSCredential +Parameter Sets: PSCredentialSet +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -skipCertificateCheck Switch to skip certificate check when connecting to the VMware Cloud Builder instance. diff --git a/docs/documentation/functions/authentication/Request-VCFToken.md b/docs/documentation/functions/authentication/Request-VCFToken.md index 9909209d5..b58c230b2 100644 --- a/docs/documentation/functions/authentication/Request-VCFToken.md +++ b/docs/documentation/functions/authentication/Request-VCFToken.md @@ -7,7 +7,7 @@ Requests an authentication token from SDDC Manager. ## Syntax ```powershell -Request-VCFToken [-fqdn] [[-username] ] [[-password] ] [-skipCertificateCheck] [] +Request-VCFToken [-fqdn] [[-username] ] [[-password] ] [[-credential] ] [-skipCertificateCheck] [] ``` ## Description @@ -22,15 +22,41 @@ The `Request-VCFToken` cmdlet connects to the specified SDDC Manager and request Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username administrator@vsphere.local -password VMw@re1! ``` -This example shows how to connect to SDDC Manager to request API access and refresh tokens. +This example shows how to connect to the specified SDDC Manager using a clear-text username and password. ### Example 2 ```powershell -Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username admin@local -password VMw@re1!VMw@re1! +$secureString = Read-Host -AsSecureString 'Password' +Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username admin@local -password $secureString ``` -This example shows how to connect to SDDC Manager using local account `admin@local`. +This example shows how to connect to the specified SDDC Manager instance using a `SecureString` password. + +### Example 3 + +```powershell +$credential = Get-Credential +Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -credential $credential +``` + +This example shows how to connect to the specified SDDC Manager instance using a PSCredential. + +### Example 4 + +```powershell +Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username admin@local +``` + +This example shows how to connect to the SDDC Manager instance where the user will be prompted for a password. + +### Example 5 + +```powershell +Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io +``` + +This example shows how to connect to the specified SDDC Manager instance where the user will be prompted for a username and password. ## Parameters @@ -40,7 +66,7 @@ The fully qualified domain name or IP Address of the SDDC Manager instance. ```yaml Type: String -Parameter Sets: (All) +Parameter Sets: PSCredentialSet, UserNameAndPasswordSet Aliases: Required: True @@ -56,10 +82,10 @@ The username to authenticate to the SDDC Manager instance. ```yaml Type: String -Parameter Sets: (All) +Parameter Sets: UserNameAndPasswordSet Aliases: -Required: False +Required: True Position: 2 Default value: None Accept pipeline input: False @@ -68,11 +94,13 @@ Accept wildcard characters: False ### -password -The password to authenticate to the SDDC Manager instance. +The password to authenticate to the SDDC Manager instance. This parameter takes either a string or a `SecureString` value. + +If not specified, the user will be prompted for the `SecureString` value. ```yaml Type: String -Parameter Sets: (All) +Parameter Sets: UserNameAndPasswordSet Aliases: Required: False @@ -82,6 +110,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -credential + +Specifies to authenticate to the SDDC Manager instance using a PSCredential object. + +```yaml +Type: PSCredential +Parameter Sets: PSCredentialSet +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -skipCertificateCheck Switch to skip certificate check when connecting to the SDDC Manager instance. From 2dfce373424ca23b32fab60bec8804d68b8d46ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 21:08:28 -0400 Subject: [PATCH 26/33] chore(deps): bump actions/setup-python from 5.2.0 to 5.3.0 (#293) --- .github/workflows/docs.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7c1924477..54ecd534b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: 3.x - name: Install Dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bffe3ebab..f7aa6b412 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,7 +136,7 @@ jobs: ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: 3.x - name: Install Dependencies From e0d72251c626bea8a61abd33728cdf3178eb69a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 20:56:36 -0500 Subject: [PATCH 27/33] chore(deps): bump actions/stale from 9.0.0 to 9.1.0 (#294) --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3ac14e87a..7b2fb857a 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,7 +10,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 + - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' days-before-stale: 60 From e0a965ec5a158ce43ea433063f942fae055e678d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 21:12:43 -0500 Subject: [PATCH 28/33] chore(deps): bump actions/setup-python from 5.3.0 to 5.4.0 (#295) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.3.0 to 5.4.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/0b93645e9fea7318ecaed2b359559ac225c90a2b...42375524e23c412d93fb67b49958b491fce71c38) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 54ecd534b..8a71db9f8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: python-version: 3.x - name: Install Dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7aa6b412..c50eb425e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,7 +136,7 @@ jobs: ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: python-version: 3.x - name: Install Dependencies From 11ae16c26f89f7dfbf365924fe0df47cdc16dd41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 21:46:09 -0400 Subject: [PATCH 29/33] chore(deps): bump actions/setup-python from 5.4.0 to 5.5.0 (#296) --- .github/workflows/docs.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8a71db9f8..9082457be 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 with: python-version: 3.x - name: Install Dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c50eb425e..2126e0828 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,7 +136,7 @@ jobs: ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 with: python-version: 3.x - name: Install Dependencies From 1df97b3a032de97436317962c064d9cd7d1dc04d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 22:09:16 -0400 Subject: [PATCH 30/33] chore(deps): bump actions/setup-python from 5.5.0 to 5.6.0 (#297) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.5.0 to 5.6.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/8d9ed9ac5c53483de85588cdf95a591a75ab9f55...a26af69be951a213d495a4c3e4e4022e16d87065) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: 5.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9082457be..807c1e703 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: 3.x - name: Install Dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2126e0828..4d7e4432c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,7 +136,7 @@ jobs: ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: 3.x - name: Install Dependencies From b1f50cdbaff9b0fa04fecd2fa4103a91d1cd9360 Mon Sep 17 00:00:00 2001 From: Erik <20067955+erikgraa@users.noreply.github.com> Date: Sat, 10 May 2025 05:11:12 +0200 Subject: [PATCH 31/33] feat: refresh access token (#298) Refresh expired access token. Signed-off-by: Erik Grina Raassum --- PowerVCF.psm1 | 1 + 1 file changed, 1 insertion(+) diff --git a/PowerVCF.psm1 b/PowerVCF.psm1 index 635baa2b9..b1fd807cf 100644 --- a/PowerVCF.psm1 +++ b/PowerVCF.psm1 @@ -4564,6 +4564,7 @@ Function checkVCFToken { $uri = "https://$sddcManager/v1/tokens/access-token/refresh" $response = Invoke-RestMethod -Method PATCH -Uri $uri -Headers $headers -Body $refreshToken $Global:accessToken = $response + createHeader # Set the Accept and Authorization headers with the new access token. } } } From cd24a1123537c5bbb645955c2fce31b3a9425405 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Fri, 6 Jun 2025 11:53:49 -0700 Subject: [PATCH 32/33] docs: update supported versions (#300) Updates supported versions. Signed-off-by: Ryan Johnson --- .github/ISSUE_TEMPLATE/bug.yml | 5 ++++- README.md | 4 +++- docs/community/index.md | 8 -------- docs/index.md | 26 +++++++++++--------------- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index a15344bb3..958cc1908 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -32,7 +32,10 @@ body: id: version-vcf attributes: label: VMware Cloud Foundation - description: Please provide the VMware Cloud Foundation version. + description: > + Please provide the VMware Cloud Foundation version. + + For details on specific VMware Cloud Foundation versions supported by this module, please refer to the [documentation](https://vmware.github.io/powershell-module-for-vmware-cloud-foundation/). validations: required: true - type: input diff --git a/README.md b/README.md index 30bc9ac23..024b1745d 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,11 @@ `PowerVCF` is an open source PowerShell Module for interacting with the [VMware Cloud Foundation][docs-vmware-cloud-foundation] public API. +For details on specific VMware Cloud Foundation versions supported by this module, please refer to the [documentation][docs-module]. + ## Documentation -Please refer to the [documentation][docs-module] for more information on how to use this module. +For detailed instructions on using this module, refer to the [documentation][docs-module]. ## Contributing diff --git a/docs/community/index.md b/docs/community/index.md index 1bac0dab0..bfe5561ae 100644 --- a/docs/community/index.md +++ b/docs/community/index.md @@ -4,11 +4,3 @@ This PowerShell module is the work of many contributors and the project team app Thank you for your interest in the project. Whether it's a bug report, enhancement, correction, or additional documentation, we greatly value feedback and contributions from our community. - -Name | Role | GitHub | -------------------|--------------|------------------------------------------------------------------| -Brian O'Connell | Maintainer | [:fontawesome-brands-github:](https://github.com/LifeOfBrianOC) | -Gary Blake | Maintainer | [:fontawesome-brands-github:](https://github.com/GaryJBlake) | -Ken Gould | Maintainer | [:fontawesome-brands-github:](https://github.com/feardamhan) | -Ryan Johnson | Maintainer | [:fontawesome-brands-github:](https://github.com/tenthirtyam) | -Giuliano Bertello | Collaborator | [:fontawesome-brands-github:](https://github.com/GiulianoBerteo) | diff --git a/docs/index.md b/docs/index.md index da155e6d5..2b868a620 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,26 +14,22 @@ ## Requirements -### Platforms +### VMware Cloud Foundation -The following table lists the supported platforms for this module. +The following table lists the supported releases for this module. -Platform | Supported --------------------------------------------------------------|------------------------------------ -:fontawesome-solid-cloud:   VMware Cloud Foundation 5.1 | :fontawesome-solid-check:{ .green } -:fontawesome-solid-cloud:   VMware Cloud Foundation 5.0 | :fontawesome-solid-check:{ .green } -:fontawesome-solid-cloud:   VMware Cloud Foundation 4.5 | :fontawesome-solid-check:{ .green } -:fontawesome-solid-cloud:   VMware Cloud Foundation 4.4 | :fontawesome-solid-check:{ .green } -:fontawesome-solid-cloud:   VMware Cloud Foundation 4.3 | :fontawesome-solid-check:{ .green } +| Platform | Support | +|--------------------------------------------------------------| ----------------------------------- | +| :fontawesome-solid-cloud:   VMware Cloud Foundation 5.2 | :fontawesome-solid-check:{ .green } | +| :fontawesome-solid-cloud:   VMware Cloud Foundation 5.1 | :fontawesome-solid-check:{ .green } | -### Operating Systems +???+ tip "Support for Newer Major Releases" -The following table lists the supported operating systems for this module. + This module will **only** be sustained for supported versions of the VMware Cloud Foundation releases listed above to address critical issues. You can find general details on supported versions in the [Broadcom Product Lifecycle](https://support.broadcom.com/group/ecx/productlifecycle). -Operating System | Version ------------------------------------------------------------------------|----------- -:fontawesome-brands-windows:   Microsoft Windows Server | 2019, 2022 -:fontawesome-brands-windows:   Microsoft Windows | 10, 11 + Please note that this module **will not** provide support or new enhancements for future major releases of VMware Cloud Foundation. If you're planning to upgrade to those newer releases, we encourage you to explore alternative in-product or custom automation solutions. + + We truly appreciate your reliance on and support of this module. Thank you for your understanding as we transition to sustaining the module for these specific major versions. ### PowerShell From 02c3ff0d8080652861a5be9b74d993288ca69af4 Mon Sep 17 00:00:00 2001 From: Nathan Thaler Date: Tue, 25 Nov 2025 14:55:16 -0500 Subject: [PATCH 33/33] (feature) moved project to archival status --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 024b1745d..ce339bd50 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,11 @@ [PowerShell Gallery][psgallery-module]   PowerShell Gallery Downloads -## Overview +## Project Archived + +The `PowerVCF` project has been archived and no further updates will be made. Please transition to [VCF.PowerCLI 9.x](https://developer.broadcom.com/powercli) to automate against SDDC Manager" + +## Historical Overview `PowerVCF` is an open source PowerShell Module for interacting with the [VMware Cloud Foundation][docs-vmware-cloud-foundation] public API.