VMware Cloud Community
hidro_franxi
Contributor
Contributor
Jump to solution

Not recognized as the name of a cmdlet, function

I'm running PowerShell script like below:

...
Install-Module -Name VMware.PowerCLI -Force
Connect-HVServer -Server ...  -User ...
Set-HVEventDatabase -ServerName ... -DatabaseType ...

As I remember, It worked in the old powercli version. When I install a new VM (Windows Server 2019) and run it, I got this error:

Set-HVEventDatabase : The term 'Set-HVEventDatabase' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

My current PowerCLI version is 12.4.0

hidro_franxi_0-1632458689883.png

Which module do I need to install to run Set-HVEventDatabase ?

Thanks.

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

The Set-HVEventDatabase cmdlet is not part of the regular PowerCLI distribution, but comes in the VMware.Hv.Helper module.


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

View solution in original post

4 Replies
LucD
Leadership
Leadership
Jump to solution

The Set-HVEventDatabase cmdlet is not part of the regular PowerCLI distribution, but comes in the VMware.Hv.Helper module.


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

hidro_franxi
Contributor
Contributor
Jump to solution

I've already added VimAutomation.HorizonView, but for sure, I added it in the script and still got the same error.

hidro_franxi_0-1632476400294.png

hidro_franxi_2-1632476606379.png

 

 

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

That is not what I said, you need the VMware.Hv.Helper module for that cmdlet, not the VimAutomation.HorizonView module.


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

Reply
0 Kudos
hidro_franxi
Contributor
Contributor
Jump to solution

Thanks, I got it.

Reply
0 Kudos