update
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
#!/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 $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null
|
||||
|
||||
Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} | Shutdown-VMGuest -Confirm:$false
|
||||
#Get-VMHost | Where {$args[0]} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} | Shutdown-VMGuest -Confirm:$false
|
||||
|
||||
Disconnect-VIServer -Server $args[0] -Force –Confirm:$false
|
||||
Get-VMHost | Where {$args[0]} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'}
|
||||
|
||||
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||||
|
||||
|
||||
|
||||
#$_.Name -eq 'ids-vms1.scity.us' -or $_.Name -eq 'ids-vms7.scity.us'
|
||||
Reference in New Issue
Block a user