Skip to content

Commit

Permalink
Update verbose messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
tpcarman committed Feb 21, 2024
1 parent ad23c09 commit a23339a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ function Invoke-AsBuiltReport.VMware.vSphere {
[PSCredential] $Credential
)

Write-PScriboMessage -IsWarning "Please refer to www.asbuiltreport.com for more detailed information about this project."
Write-PScriboMessage -IsWarning "Do not forget to update your report configuration file after each new version release."
Write-PScriboMessage -IsWarning "Documentation: https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere"
Write-PScriboMessage -IsWarning "Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues"
Write-PScriboMessage -Plugin "Module" -IsWarning "Please refer to www.asbuiltreport.com for more detailed information about this project."
Write-PScriboMessage -Plugin "Module" -IsWarning "Do not forget to update your report configuration file after each new version release."
Write-PScriboMessage -Plugin "Module" -IsWarning "Documentation: https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere"
Write-PScriboMessage -Plugin "Module" -IsWarning "Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues"

# Check the current AsBuiltReport.VMware.vSphere module
Try {
$InstalledVersion = Get-Module -ListAvailable -Name AsBuiltReport.VMware.vSphere -ErrorAction SilentlyContinue | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version

if ($InstalledVersion) {
Write-PScriboMessage -IsWarning "AsBuiltReport.VMware.vSphere $($InstalledVersion.ToString()) is currently installed."
Write-PScriboMessage -Plugin "Module" -IsWarning "AsBuiltReport.VMware.vSphere $($InstalledVersion.ToString()) is currently installed."
$LatestVersion = Find-Module -Name AsBuiltReport.VMware.vSphere -Repository PSGallery -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version
if ($LatestVersion -gt $InstalledVersion) {
Write-PScriboMessage -IsWarning "AsBuiltReport.VMware.vSphere $($LatestVersion.ToString()) is available."
Write-PScriboMessage -IsWarning "Run 'Update-Module -Name AsBuiltReport.VMware.vSphere -Force' to install the latest version."
Write-PScriboMessage -Plugin "Module" -IsWarning "AsBuiltReport.VMware.vSphere $($LatestVersion.ToString()) is available."
Write-PScriboMessage -Plugin "Module" -IsWarning "Run 'Update-Module -Name AsBuiltReport.VMware.vSphere -Force' to install the latest version."
}
}
} Catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
Write-PscriboMessage -Plugin "Module" -IsWarning $_.Exception.Message
}
# Check if the required version of VMware PowerCLI is installed
Get-RequiredModule -Name 'VMware.PowerCLI' -Version '13.2'
Expand Down

0 comments on commit a23339a

Please sign in to comment.