error when importing module
lorriEDw opened this issue · comments
I am using VMware vSphere PowerCLI6.0 Release 3 and copied the Vi-Module to the modules folder
ProgramFiles(x86)/VMware/Infrastructure/vSpherePowerCLI/Modules
when I run the Import-Module Vi-Module -Force -Verbose I get the attached errors - should this work with powercli? or am I missing something?
Thanks
It seems you had Copy-Pasted the RAW file from Github, try Clone or download
button from the main PowerCLi repo page.
The download was taken from the main PowerCLi page. But you gave me another idea to copy-paste from the RAW file from Github. That worked, the code is error free. Thanks.
If I had Copy-Pasted the RAW file from Github import module had been done.
This is known issue, sometimes files would be damaged while downloading from the GitHub :-(
There are two download methods: copy-paste raw files or download a whole repository zip file
The reason is your enterprise proxy or antivirus software.
Try to use different download method or download outside your organization.
I found that in Vi-Module.psm1 there was a ANSI character – that is displayed as - in UTF-8 encoding in 3 places. Once I replaced – with - it worked as expected.