diff --git a/esxi-scripts/get-snapshots.ps1 b/esxi-scripts/get-snapshots.ps1 index b29fa176..f2b570b4 100755 --- a/esxi-scripts/get-snapshots.ps1 +++ b/esxi-scripts/get-snapshots.ps1 @@ -1,11 +1,11 @@ #!/usr/bin/env pwsh -Write-Progress -Activity "Connecting to vCenter..." -PercentComplete 20 +Write-Progress -Activity "Connecting to vCenter [$VCENTERHOST] ..." -PercentComplete 20 . /opt/idssys/powerwall/settings.ps1 Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null -Write-Progress -Activity "Connected! Gathering Snapshots..." -PercentComplete 80 +Write-Progress -Activity "Connected! Gathering all VM Snapshots ..." -PercentComplete 80 $snapshots = 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 diff --git a/powerwall.sh b/powerwall.sh index bf73cdd5..9f995369 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -717,10 +717,6 @@ LOGROTATE(){ GET_SNAPSHOTS(){ echo -e "\n${idsCL[Yellow]}LISTING ALL VM SNAPHOTS IN VCENTER ${idsCL[Default]}(minus offsite replicas)" DIVIDER . lightGreen 70 - # echo -en "${idsCL[LightCyan]}Connecting to vCenter ...${idsCL[Default]}" - # snapshots=`${PW_FOLDER}/esxi-scripts/get-snapshots.ps1` - # echo -en "\033[2K\e[0K\r" - # echo -e "${snapshots}" ${PW_FOLDER}/esxi-scripts/get-snapshots.ps1 echo