This commit is contained in:
2023-09-15 20:27:10 -05:00
parent 222dcc921a
commit d2e512e071
3 changed files with 18 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
VERS='2.2.62-09092023' VERS='2.2.63-09152023'
noheader=' update service dailytemp ' noheader=' update service dailytemp '

8
esxi-scripts/get-snapshots.ps1 Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env pwsh
. /opt/idssys/powerwall/settings.ps1
Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword
get-vm | get-snapshost | select, vm, name, description, created, sizegb

View File

@@ -888,6 +888,13 @@ LOGROTATE(){
# STARTALL_SERVICES # STARTALL_SERVICES
} }
GET_SNAPSHOTS(){
for ESXIHOST in "${PW_SYSHOSTS[@]}"; do
echo -en "${ESXIHOST}"
${PW_FOLDER}/esxi-scripts/get-snapshots.ps1 ${ESXIHOST} >/dev/null 2>&1
fi
}
TEST(){ TEST(){
start=`date +%s` start=`date +%s`
temptotal=0 temptotal=0
@@ -952,6 +959,8 @@ fi
shutdownhost) SHUTDOWN_SERVER ${2};; shutdownhost) SHUTDOWN_SERVER ${2};;
shutdown_servers) SHUTDOWN_SERVERS ${2};; shutdown_servers) SHUTDOWN_SERVERS ${2};;
get-snapshots) GET_SNAPSHOTS;;
service) service)
if [ "${2}" = "all" ]; then if [ "${2}" = "all" ]; then
if [ "${3}" == "stop" ]; then if [ "${3}" == "stop" ]; then