diff --git a/defaults.inc b/defaults.inc index dde5e4c9..fdb77639 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.2.90-10212023' +VERS='2.2.100-10212023' noheader=' update service dailytemp ' diff --git a/esxi-scripts/get-snapshots.ps1 b/esxi-scripts/get-snapshots.ps1 index 10c051ed..d9948a97 100755 --- a/esxi-scripts/get-snapshots.ps1 +++ b/esxi-scripts/get-snapshots.ps1 @@ -5,6 +5,6 @@ Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null # Connect-VIServer -Server 10.2.1.11 -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 +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 b14de72e..d17e4e17 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -900,20 +900,17 @@ GET_SNAPSHOTS(){ echo -e "${idsCL[LightGreen]}${PW_ESXI_HOST_NAMES[${ESXIHOST}]} (${ESXIHOST}) " DIVIDER . lightGreen 70 echo -en "${idsCL[LighGreen]}Looking for snapshots...${idsCL[Default]}" - result=`${PW_FOLDER}/esxi-scripts/get-snapshots.ps1 ${ESXIHOST}` + snapshots=`${PW_FOLDER}/esxi-scripts/get-snapshots.ps1 ${ESXIHOST}` if [ "${result}" != "" ]; then echo -en "\033[2K\033[1A" - # echo ${result} | jq - - - for row in $(echo ${result} | jq -r '.[] | @base64'); do - vm=`echo ${row} | base64 --decode | jq -r '.VM'` - name=`echo ${row} | base64 --decode | jq -r '.Name'` - created=`echo ${row} | base64 --decode | jq -r '.Created'` - size=`echo ${row} | base64 --decode | jq -r '.SizeGB'` - echo "$vm - $name - $created - $size" - done - + echo ${result} + # for snapshot in $(echo ${snapshots} | jq -r '.[] | @base64'); do + # vm=`echo ${snapshot} | base64 --decode | jq -r '.VM'` + # name=`echo ${snapshot} | base64 --decode | jq -r '.Name'` + # created=`echo ${snapshot} | base64 --decode | jq -r '.Created'` + # size=`echo ${snapshot} | base64 --decode | jq -r '.SizeGB'` + # echo "$vm - $name - $created - $size" + # done else echo -e "\033[2K\e[0K\r No snapshots found"