VMware Cloud Community
miguelvelezwhit
Enthusiast
Enthusiast
Jump to solution

Can modules for PowerCLI be used even if module's application is not present?

OK.  I just saw the exciting news about PowerCLI being offered in the PowerShell Gallery (*sweeeeeet*).  As I was looking at the information.  I saw the list of all the modules (i.e. VMware VimAutomation.Core, VMware.VimAutomation.SDK, etc).

I've learned from all of you how to ensure that all these modules are truly loaded when I open up PowerCLI.  However, the majority of the commands, cmdlets and other components that I've been using is limited pretty much to the xxxx..xxxxx.Core stuff.

I've been tasked with a new project to catalog the various alarms that are available to configure.  Based on everything I've read, each module gives you a host of new options/things to monitor that's pretty close to infinite as monitoring goes.  In the current environment that this project is for, there's no vROPS application - they opted for SolarWinds VMAN (*yukkk*).  Anyway, I began to wonder..if the module is there and loaded, are those functions available to me to monitor; even if I don't have vROPS installed?

This is one of those time-sensitive things, so if anyone has THE answer on this, I'd love to know it before I start digging another rabbit hole for myself.

Thanks to you all...the best darn community on the planet!!  CLIers Rule!!!

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You can load those modules, no problem.

But you can't use them, since the app is not there (for example Connect-OMServer will have nothing to connect to).

Not sure what you mean by "monitor".
But if the app is not there, those cmdlets will fail.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

You can load those modules, no problem.

But you can't use them, since the app is not there (for example Connect-OMServer will have nothing to connect to).

Not sure what you mean by "monitor".
But if the app is not there, those cmdlets will fail.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
miguelvelezwhit
Enthusiast
Enthusiast
Jump to solution

Yes, I just found out that painful news as well.  I did a poll on the Get-Command -Module VMware.VimAutomation.vROPS.  There are alerts which can be retrieved or set, but as you pointed out, that whole Get-OM* means that it's something that comes out of vROPS directly.

What I'm attempting to 'monitor' is really a matter of finding all the possible alerts in vCenter and from that list, management will chose the ones from vCenter that they want to set up for either the SNMP trap or send email to a designated user/group.  I keep hearing that there are all these alarms in just vCenter alone, but the 155 that I found I'm not sure if that's all of them or not.

I was even trying to put together a script which could find all the available alarms in vCenter, but I keep messing up on the syntax.  How do I pull the list of 'alarm definitions' at the vCenter Server level?

Thanks in advance. Smiley Happy

0 Kudos
LucD
Leadership
Leadership
Jump to solution

This gives you a list of the ones that are defined.
But there are many more possible.

Event alarms can be based on a whole bunch of events, performance alarms can be based on nearly every available metric...
So there are a lot of possibilities.

$si = Get-View ServiceInstance

$alarmMgr = Get-View -Id $si.Content.AlarmManager

Get-View -Id $alarmMgr.GetAlarm($null) |

Select @{N='Name';E={$_.Info.Name}},

    @{N='Enabled';E={$_.Info.Enabled}},

    @{N='Entity';E={Get-View -Id $_.Info.Entity -Property Name | Select -ExpandProperty Name}},

    @{N='Description';E={$_.Info.Description}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos