VMware Horizon Community
anothervsphereu
Enthusiast
Enthusiast

vmware.hv.helper powershell module

I am trying to get this module "installed".  But when i run import-module, I get the following errors.

The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.

At C:\scripts\Horizon\VMware.HV.Helper.psm1:176 char:190

+ ... ata-ga-click="(Logged out) Header, go to Features">Features <span cla ...

+                                                                 ~

The '<' operator is reserved for future use.

At C:\scripts\Horizon\VMware.HV.Helper.psm1:176 char:261

+ ... ="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</s ...

I downloaded the module code from github and made no modifications.  I am running powercli 10.0 and powershell 5.1.

Has anyone else had this issue?

0 Kudos
2 Replies
AFA1K
VMware Employee
VMware Employee

I can reproduce the errors when I download the vmware.hv.helper.psm1 and vmware.hv.helper.psd1 files directly from Github using Chrome then import this module.

I do not see these errors when importing the module from the full powercli-example-scripts zip file (GitHub - vmware/PowerCLI-Example-Scripts ).

I assume the encoding of the module is modified when downloading the module 'standalone' as detailed here (different scenario but same errors) Ampersand not allowed. The & operator is reserved for future use while the encoding is not modified when downloading the full archive.

Regardless, try downloading the full archive & see if that helps.

0 Kudos
sjesse
Leadership
Leadership

looking at this it looks like you downloaded the webpage, you can tell by the error

ata-ga-click="(Logged out) Header, go to Features">Features <span cla

Thats html code.

To download it go to

GitHub - vmware/PowerCLI-Example-Scripts

click the green downlaod button  and click download zip

Then unzip the file and go to the hvhelper there