Sample Exchange

 View Only

VRealize Operations Maintenance Mode 

Aug 04, 2016 06:45 PM

vRealize Operations Maintenance Mode
 

Places a vSphere Inventory object into maintenance mode in vRealize Operations

 

Example

Set All VMs with a name as backup as being in maintenance mode for 20 minutes:



Get-VM backup* | Enable-OMMaintenance -MaintenanceTime 20

Name Health ResourceKind Description
---- ------ ------------ -----------
backup-089e13fd-7d7a-0 Grey VirtualMachine
backup-d90e0b39-2618-0 Grey VirtualMachine
backup-e48ca842-316a-0 Grey VirtualMachine
backup-77da3713-919a-0 Grey VirtualMachine
backup-c32f4da8-86c4-0 Grey VirtualMachine
backup-c3fcb95c-cfe2-0 Grey VirtualMachine
backup-4318bb1e-614a-0 Grey VirtualMachine

#vROPS
#vRealizeOperationsManager
#BSD3-Clause
#VMwarePowerCLI
#PowerShell

Statistics
0 Favorited
2 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
ps1 file
vRealize Operations Maintenance Mode.ps1   6 KB   1 version
Uploaded - Apr 09, 2024

Tags and Keywords

Comments

Nov 03, 2022 04:25 PM

I created a similar one specific to the vCenter adapter using the vROps API instead. Have a look, and great work!
https://developer.vmware.com/web/dp/samples?id=8010

Jun 21, 2017 12:33 PM

For anyone interested I have written a Powershell script which just uses invoke-RestMethod and hits the Suite-API.... in case you cant install PowerCLI...
Check it out here: http://vman.ch/vrops-maintenance-mode-for-resources/

Related Entries and Links

No Related Resource entered.