This commit is contained in:
2023-12-30 10:46:04 -06:00
parent 857779e522
commit c708d8929d
13 changed files with 90 additions and 53 deletions

View File

@@ -1,11 +1,11 @@
#!/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
# Connect-VIServer -Server 10.2.1.11 -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null
$ESXI = 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
exit 0
Disconnect-VIServer $ESXI -Confirm:$false