Skip to content

Commit

Permalink
:code/changed_VMware.CloudFoundation.Reporting.psm1_added
Browse files Browse the repository at this point in the history
added code into Invoke-VcfHealthReport function to handle if end user does not have tar.exe installed on windows or linux box to install that first before running function

Signed-off-by: Jared Burns <burnsja@vmware.com>
  • Loading branch information
burnsjared0415 authored and tenthirtyam committed Nov 16, 2023
1 parent 0899c29 commit 1f97012
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions VMware.CloudFoundation.Reporting.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,14 @@ Function Invoke-VcfHealthReport {

Try {
Clear-Host; Write-Host ""

if ($PSVersionTable.PSEdition -eq "Desktop" -or $PSVersionTable.OS -like "Microsoft Windows*") {
$tarPath = (Get-Command tar -ErrorAction SilentlyContinue).Source
if (!($tarPath)) {
Write-Warning "The tar utility is required to run this cmdlet. Please check the module system requirements and try again."
return
}
}

if (Test-VCFConnection -server $sddcManagerFqdn) {
if (Test-VCFAuthentication -server $sddcManagerFqdn -user $sddcManagerUser -pass $sddcManagerPass) {
Expand Down

0 comments on commit 1f97012

Please sign in to comment.