update
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
#!/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
|
||||
|
||||
Do {
|
||||
$VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-*'} | Get-VM
|
||||
@@ -28,4 +26,4 @@ Do {
|
||||
} Until ($poff -match 'yes')
|
||||
|
||||
|
||||
Disconnect-VIServer -Server $args[0] -Force –Confirm:$false
|
||||
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#!/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-Datastore | Where {$_.Name -like '*iSCSI-*' -and $_.Name -notlike '*vMS*'} | 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
|
||||
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#!/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
|
||||
|
||||
Do {
|
||||
$VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM
|
||||
@@ -28,4 +26,4 @@ Do {
|
||||
} Until ($poff -match 'yes')
|
||||
|
||||
|
||||
Disconnect-VIServer -Server $args[0] -Force –Confirm:$false
|
||||
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#!/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-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'} | Shutdown-VMGuest -Confirm:$false
|
||||
|
||||
Disconnect-VIServer -Server $args[0] -Force –Confirm:$false
|
||||
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#!/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
|
||||
|
||||
Do {
|
||||
$VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-PRI*'} | Get-VM
|
||||
@@ -28,4 +26,4 @@ Do {
|
||||
} Until ($poff -match 'yes')
|
||||
|
||||
|
||||
Disconnect-VIServer -Server $args[0] -Force –Confirm:$false
|
||||
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#!/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-Datastore | Where {$_.Name -like '*iSCSI-PRI*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'} | Shutdown-VMGuest -Confirm:$false
|
||||
|
||||
Disconnect-VIServer -Server $args[0] -Force –Confirm:$false
|
||||
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||||
|
||||
Reference in New Issue
Block a user