This commit is contained in:
2023-10-21 23:03:55 -05:00
parent 34505784d8
commit 4218372f92
2 changed files with 8 additions and 2 deletions

View File

@@ -5,5 +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
get-vm | get-snapshot | where {($_.vm -notlike '*_replica')} | select vm, name, description, created, sizegb | ConvertTo-Json -Depth 1

View File

@@ -901,7 +901,12 @@ GET_SNAPSHOTS(){
DIVIDER . lightGreen 70
echo -en "${idsCL[LighGreen]}Looking for snapshots...${idsCL[Default]}"
result=`${PW_FOLDER}/esxi-scripts/get-snapshots.ps1 ${ESXIHOST}`
[ "${result}" != "" ] && echo -e "\033[2K\033[1A${result}" || echo -e "\033[2K\e[0K\r No snapshots found"
if [ "${result}" != "" ]; then
echo -en "\033[2K\033[1A"
echo ${result} | jq
else
echo -e "\033[2K\e[0K\r No snapshots found"
fi
DIVIDER true lightGreen 70
fi
done