From e928f5b56abe0551f27fece91d95f17ec47def61 Mon Sep 17 00:00:00 2001 From: Alan Renouf Date: Thu, 10 Nov 2016 16:12:42 -0800 Subject: [PATCH] removed connection info and commented out examples removed connection info and commented out examples --- .../vRealize Operations Maintenance Mode.ps1 | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Scripts/vRealize Operations Maintenance Mode.ps1 b/Scripts/vRealize Operations Maintenance Mode.ps1 index a6ff9e5..d216e31 100644 --- a/Scripts/vRealize Operations Maintenance Mode.ps1 +++ b/Scripts/vRealize Operations Maintenance Mode.ps1 @@ -1,6 +1,3 @@ -Connect-VIServer vc-l-01a.corp.local -User administrator@vsphere.local -Password VMware1! -Connect-OMServer vrops.corp1.local -User admin -Password VMware1! - function Enable-OMMaintenance { <# .NOTES @@ -96,21 +93,21 @@ function Disable-OMMaintenance { } } -Write-Host "Enable a single host as being in maintenance mode for 1 minute" -Enable-OMMaintenance -Resource ESX-01a* -MaintenanceTime 1 +#Write-Host "Enable a single host as being in maintenance mode for 1 minute" +#Enable-OMMaintenance -Resource ESX-01a* -MaintenanceTime 1 -Write-Host "List All Host Resources and their state" -Get-OMResource ESX-* | Select Name, State | FT +#Write-Host "List All Host Resources and their state" +#Get-OMResource ESX-* | Select Name, State | FT -Write-Host "Set All VMs with a name as backup as being in maintenance mode for 20 minutes" -Get-VM backup* | Enable-OMMaintenance -MaintenanceTime 20 +#Write-Host "Set All VMs with a name as backup as being in maintenance mode for 20 minutes" +#Get-VM backup* | Enable-OMMaintenance -MaintenanceTime 20 -Write-Host "List All Backup VM Resources and their state" -Get-VM backup* | Get-OMResource | Select Name, State | FT +#Write-Host "List All Backup VM Resources and their state" +#Get-VM backup* | Get-OMResource | Select Name, State | FT -Write-Host "Disable maintenance mode for all VMs with a name as backup as we have completed our scheduled work" -Get-VM backup* | Disable-OMMaintenance +#Write-Host "Disable maintenance mode for all VMs with a name as backup as we have completed our scheduled work" +#Get-VM backup* | Disable-OMMaintenance -Write-Host "List All VM Resources and their state" -Get-VM backup* | Get-OMResource | Select Name, State | FT +#Write-Host "List All VM Resources and their state" +#Get-VM backup* | Get-OMResource | Select Name, State | FT