- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a linux version? I tried copying from the original ZIP file and also from a Windows machine, but it does not work under linux.
I can load up the module VMware.VimAutomation.HorizonView, so Connect-HVServer command works.
I get this error on Linux (openSUSE : Leap v15.2) when trying commands from module VMware.Hv.Helper:
Get-HVMachineSummary : The term 'Get-HVMachineSummary' is not recognized as the name of a cmdlet, function, script file, or operable program.
Thanks, Rod
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello me it works,
did you follow the instructions on this site
Run Example Horizon PowerCLI Scripts (vmware.com)
and then imported the modules?
import module in linux · Issue #2399 · PowerShell/PowerShell · GitHub
If you can't, I'll send you the configuration details
Bye
Fabio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shouldn't have to import modules anymore, they should autoload. Where did you place VMware.Hv.Helper, it should go in location that powershell will check like
/usr/local/share/powershell/Modules
You can also check the path looking at this variable
$env:PSModulePath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@sjesse I had to import them by hand otherwise it wouldn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anything past PowerShell 3.0 is supposed to autoload modules that are in the correct folder, that should include the core versions of powershell.
I'm going to move this to powercli since I think it may get more people familiar with Linux Powershell issues, this doesn't seem to be directly related to the helper module since we know that works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This actually worked for me! Thanks.
I had to do this prior to importing it (inside the script):
cd /usr/local/share/powershell/Modules/VMware.Hv.Helper
./VMware.HV.Helper.psm1
Import-Module ./VMware.HV.Helper.psm1
Then my script worked! Weird only this module (so far) is doing this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure why it's not auto-loading, but the manual process offered resolved my situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah it looks like your have it in the correct location, so I'm not sure, I do most of my powershell stuff on windows they only recently added the horizon commands to linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All good! Really appreciate the help from you guys! Your answer also helped me learn a something about the paths! And at the end I got the fix needed to make it work! ![]()
![]()
![]()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need the latest powercli and it will only work with Horizon 8 2012, it doesn't work for older versions. If you're on Linux I would recommend looking at the python module I am creating. https://www.retouw.nl/2021/01/23/using-the-horizon-rest-apis-with-python/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After making sure the module=VMware.Hv.Helper was saved to /usr/local/share/powershell/Modules/, I had to do this (inside the script), prior to importing it:
cd /usr/local/share/powershell/Modules/VMware.Hv.Helper./VMware.HV.Helper.psm1 (after farther testing, not actually needed in my case!)
Import-Module ./VMware.HV.Helper.psm1
Only after the above, everything worked fine.
I currently have linux: openSUSE Leap v15.2 running:
PSVersion=6.1.3
PSEdition=Core
Very cool you are providing python solution as well! Thanks! ![]()
![]()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you're welcome, it isn't feature complete yet but we're slowly getting on par with at least the available rest methods. Sadly the rest api's ain't feature complete yet in the beginning