#!/usr/bin/env pwsh # Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null # . /opt/idssys/powerwall/settings.ps1 # # Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null # # get-vm | get-snapshot | where {($_.vm -notlike '*_replica')} | select vm, name, description, created, sizegb # # get-vm | get-snapshot | where {($_.vm -notlike '*_replica')} | select vm, name, description, created, sizegb | ConvertTo-Json -Depth 1 -WarningAction:SilentlyContinue # # Disconnect-VIServer -Server $args[0] -Force –Confirm:$false . /opt/idssys/powerwall/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null get-vm | get-snapshot | where {($_.vm -notlike '*_replica')} | select vm, name, description, created, sizegb # get-vm | get-snapshot | where {($_.vm -notlike '*_replica')} | select vm, name, description, created, sizegb | ConvertTo-Json -Depth 1 -WarningAction:SilentlyContinue Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false