hidro_franxi
Contributor
Contributor

Not recognized as the name of a cmdlet, function

Jump to solution

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.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

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

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

hidro_franxi
Contributor
Contributor

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

 

 

0 Kudos
LucD
Leadership
Leadership

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

0 Kudos
hidro_franxi
Contributor
Contributor

Thanks, I got it.

0 Kudos