diff --git a/esxi-scripts/get-snapshots.ps1 b/esxi-scripts/get-snapshots.ps1 index d4c476bc..c1d03b04 100755 --- a/esxi-scripts/get-snapshots.ps1 +++ b/esxi-scripts/get-snapshots.ps1 @@ -2,7 +2,7 @@ . /opt/idssys/powerwall/settings.ps1 -Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword +Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null get-vm | get-snapshot | select vm, name, description, created, sizegb diff --git a/esxi-scripts/host-maintenance_mode.ps1 b/esxi-scripts/host-maintenance_mode.ps1 index 4e7f6333..e7234987 100755 --- a/esxi-scripts/host-maintenance_mode.ps1 +++ b/esxi-scripts/host-maintenance_mode.ps1 @@ -2,6 +2,6 @@ . /opt/idssys/powerwall/settings.ps1 -Connect-VIServer -Server $PW_VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS +Connect-VIServer -Server $PW_VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null Get-VMHost -Name $args[0] | set-vmhost -State Maintenance diff --git a/esxi-scripts/iscsi-server-shutdown.ps1 b/esxi-scripts/iscsi-server-shutdown.ps1 index 344fda6f..e1d7680b 100755 --- a/esxi-scripts/iscsi-server-shutdown.ps1 +++ b/esxi-scripts/iscsi-server-shutdown.ps1 @@ -2,6 +2,6 @@ . /opt/idssys/powerwall/settings.ps1 -Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword +Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null Get-VM | Where {$_.Name -like '*iSCSI*'} | Shutdown-VMGuest -Confirm:$false diff --git a/esxi-scripts/iscsi-vm-shutdown-verify.ps1 b/esxi-scripts/iscsi-vm-shutdown-verify.ps1 index c90091ba..2de4c8d8 100755 --- a/esxi-scripts/iscsi-vm-shutdown-verify.ps1 +++ b/esxi-scripts/iscsi-vm-shutdown-verify.ps1 @@ -2,7 +2,7 @@ . /opt/idssys/powerwall/settings.ps1 -Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword +Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null Get-Datastore | Where {$_.Name -like '*iSCSI1*' -or $_.Name -like '*iSCSI2*'} | Get-VM | if ($_.PowerState -eq "PoweredOn") { Try{ diff --git a/esxi-scripts/iscsi-vm-shutdown.ps1 b/esxi-scripts/iscsi-vm-shutdown.ps1 index 5fac0de8..c3564a7a 100755 --- a/esxi-scripts/iscsi-vm-shutdown.ps1 +++ b/esxi-scripts/iscsi-vm-shutdown.ps1 @@ -2,6 +2,6 @@ . /opt/idssys/powerwall/settings.ps1 -Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword +Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null Get-Datastore | Where {$_.Name -like '*iSCSI1*' -or $_.Name -like '*iSCSI2*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'} | Shutdown-VMGuest -Confirm:$false diff --git a/esxi-scripts/sys-suspend.ps1 b/esxi-scripts/sys-suspend.ps1 index 8b809d54..9c6e012a 100755 --- a/esxi-scripts/sys-suspend.ps1 +++ b/esxi-scripts/sys-suspend.ps1 @@ -2,6 +2,6 @@ . /opt/idssys/powerwall/settings.ps1 -Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword +Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null Get-VM | Where {$_.PowerState -like '*On*' -and ($_.Name -like '*MySQL*' -or $_.Name -like '*PiHole*' -or $_.Name -like '*vCenter*')} | Suspend-VM -Confirm:$false diff --git a/esxi-scripts/vm-shutdown.ps1 b/esxi-scripts/vm-shutdown.ps1 index 07f53b67..3c5004e8 100755 --- a/esxi-scripts/vm-shutdown.ps1 +++ b/esxi-scripts/vm-shutdown.ps1 @@ -2,6 +2,6 @@ . /opt/idssys/powerwall/settings.ps1 -Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword +Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} | Shutdown-VMGuest -Confirm:$false