• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
ControlUp Community

ControlUp Community

Connect, Learn, and Grow

  • Blog
  • Podcast
  • Meetups
  • Archives
  • Categories
    • ControlUp One Platform
    • ControlUp for Apps
    • ControlUp for Compliance
    • ControlUp for Desktops
    • ControlUp Scripts & Triggers
    • ControlUp Synthetic Monitoring
    • ControlUp for VDI
  • Topics
  • Events
    • Logos & Wallpaper
    • ControlUp.com
  • Join

Troubleshooting ControlUp Script Show Horizon View Usage

Posted on June 23, 2023

A user asked about the ControlUp script https://www.controlup.com/script-library-posts/show-horizon-view-usage/. An error occurred due to a missing module ("VMware.VimAutomation.HorizonView") which can be resolved by installing it with a ‘Install-Module’ command using the ‘-Scope AllUsers’ parameter. The need for the scope was explained, and additional tips were provided regarding Automated Actions and where the script should run. An update to the script will be available in the July release.


Read the entire ‘Troubleshooting ControlUp Script Show Horizon View Usage’ thread below:

Any successfully use this script? https://www.controlup.com/script-library-posts/show-horizon-view-usage/

It doesn’t list any pre-reqs but I get this error:

Import-Module : The specified module ‘VMware.VimAutomation.HorizonView’ was not loaded because no valid module file

was found in any module directory.

At C:\Users\bmarofsky\AppData\Roaming\ControlUp\Scripts\06a2cdf4-5900-483b-b54a-bfdc8170ae7c.ps1:157 char:11

  • $module = Import-Module -Name VMware.VimAutomation.HorizonView -Verbo …
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : ResourceUnavailable: (VMware.VimAutomation.HorizonView:String) [Import-Module], FileNotF

oundException

+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand


It needs VMware PowerCLI which includes that module. This can be installed via Install-Module


would that be installed on the machine that initiates the script or on the View server? Having a pre-reqs section of the script library might be a good idea


Needs to be installed where the script runs which doesn’t need to be the Horizon Server

I’ve passed your point about pre-reqs up the chain of command


thx


I’ll put out an update to the script – at least a #requires and an update to the notes. It should go out in the July release all being well.


thanks! I still get the same error. I’ll look more into it next week.


Keep in mind that the module needs to be installed where the script is set to run in the execution context. If it’s set to "Other Machine" in the script you need to target the machine in the console with the module. If you select "Target Machine" It will be run on which ever machine the script is running against in the console. If you select "Console/Monitor" it will be run on the console if you manually run the script, otherwise it will be run on any monitor that has the assigned data source.

The same goes for if you’re running it as an Automated Action, a target machine would be run on whatever target where the trigger was fired, console/monitor would be run on the monitor, which in itself is a console etc


its currently set to ControlUp Console/Monitor


And the Install-Module should specify -Scope AllUsers to be sure that it’s visible to the account used to run the script. Probably obvious, but saying it anyway.


thx, not obvious to Powershell noobs like me

i ran this: Install-Module VMware.PowerCLI -Scope CurrentUser

changed to AllUsers and getting the same.. I’ll pick this up next week.


Yeah current user will only install it to your user profile, it will need to be for all users

Continue reading and comment on the thread ‘Troubleshooting ControlUp Script Show Horizon View Usage’.  Not a member? Join Here!


Categories: All Archives, ControlUp Scripts & Triggers
Topics: ControlUp Script Library, Microsoft, PowerShell, Scripts, Triggers, VMware, VMware Horizon View

Ask Us Anything, Connect, Learn, and Grow with the ControlUp Community!

Login to the ControlUp Community to ask us anything, stay up-to-date on what’s new and coming soon and meet other like-minded techies like you.

Not already a member? Join Today!

Primary Sidebar

ControlUp Academy

Enroll in ControlUp Academy for expert-led technical training, equipping you with skills to effectively deploy, manage, and grow your ControlUp investment.

Learn here >

Rotating Images

Hidden Gem from our Community on Slack!

ControlUp Betas - What's Coming Next?
NEW ControlUp Features - Stay Up-to-Date!
ControlUp Scripts - Scripting, Zero to Hero
Latest KB Articles - Be the First to Learn
Did you Know - with Sivan Kroitoru
Practical Perspectives Technical Use Case Training

Video Tutorials Library

Visit our technical how-to videos, offering step-by-step tutorials on advanced features, troubleshooting, and best practices.

Watch here >

ControlUp Blog

Check out the ControlUp blog for expert advice and in-depth analysis.

Read here >

ControlUp Script Library

Visit the ControlUp technical script library, which offers a multitude of pre-built scripts and custom actions for your monitoring and troubleshooting requirements.

See here >

ControlUp Support

Visit the ControlUp support home and to delve deeper into ControlUp solutions.

Browse here >

Download ControlUp RealTime DX

Start with ControlUp for real-time end-user environment insights, swift troubleshooting, and unprecedented performance optimization. Download now.

Download here >

Footer

      

ControlUp Community
Of Techie, By Techie, For Techie!

Terms of Use | Privacy Policy | Security
Dive Deeper, Learn more at ControlUp.com

  • facebook
  • twitter
  • youtube
  • linkedin

© 2023–2025 ControlUp Technologies LTD, All Rights Reserved.

We use cookies to ensure that we give you the best experience on our website. by continuing to use this site you agree to our Cookie policy..