This product is insanely frustrating. I can't spend money on this

I installed PowerShell Universal on a Windows 2019 server. The first thing I wanted to do was configure it to synchronize with Git / BitBucket. It wouldn’t synchronize with BitBucket, and I had to go digging through the Windows Event Viewer to find out that it wouldn’t sync because the directory wasn’t empty. I took the “.universal” file out of the repository, and it finally synchronized. But PSU crashes when that .universal file isn’t present, so I had to put it back. Even though that file is there, it will eventually crash if you’re using Git (at least in TwoWay mode), so I decided to just push the repository content to BitBucket myself.

Then I spent a bunch of time trying to figure out the best way to store functions for reusability. The amount of conflicting documentation that exists is staggering. At this point, I think I’m supposed to keep the functions in a ps1 file in the repository and then dot-source or import-module, but it doesn’t sound like I’m actually keeping that ps1 file with the PSU scripts in the GUI, just in the repository folder. Loading functions in a dashboard USED to require a UDEndpointInitialization command, but now it doesn’t. The documentation only says “You don’t need it anymore.” That’s it? What the hell do I do instead? The documentation does this a LOT - short, vague answers everywhere.

Then I attempted to install the Visual Studio Code extension on my Windows 10 system to use the instance I installed on 2019, and it complained about not being able to find the executable, so I installed PSU locally on my Windows 10 system. I figured out how to enter the path to the executable, and THEN the VSCode extension kept giving me a message about the terminal failing. It was failing because PSU was already running, so I had to go figure out how to tell it not to connect. So no matter what you do - install PSU locally, don’t install PSU locally - it’s going to fail when you first load the extension. Then the documentation said I could edit the scripts.ps1 file to instantiate a new script, so I did so and then PSU crashed on my Windows 10 instance.

I am angry because I was REALLY excited when I found this product. I manage vSphere, Pure storage arrays, and Cisco UCS - all of this stuff lives in PowerShell and I thought I’d finally have an environment that helped me tie it all together and produce some great visual output. But everything about this product and its ecosystem is buggy and disjointed.

My intent was to evaluate this product, produce some working examples, and convince my management to purchase the product, but I can’t even get this thing running long enough to code in it. Since I’m not a paying customer, I’m not entitled to any support outside of the forums, and I really don’t have time to post and wait for answers. I don’t think there’s any way forward with this product unless I missed something that’s just obvious to everyone else.

So where did I go wrong?

Product: PowerShell Universal
Version: 2.2.1
2 Likes

Sorry you’re having a bad time.

Git: You might have more success with the 2.3 pre-release and the git sync. It resolves some issues that were present in the 2.2.1 version. https://imsreleases.z19.web.core.windows.net/

Modules\Functions: There isn’t any built in functionality to create reusable snippets of code. We just treat the PS scripts are PS scripts so if you’d have to just store a PSM1 or PS1 and import those modules accordingly. You can also use Environments to automatically load modules into all feature groups: Environments - PowerShell Universal

I do like the idea of having a built in Modules section though. It would be a nice addition to the product.

Docs: I’m always trying to improve the docs so if anything isn’t clear, please feel free to file an issue: GitHub - ironmansoftware/issues: Public Issue tracker for Ironman Software. Linking to the page that you find incomplete would be helpful.

VS Code: In the settings, turn off the Start Server option. Not sure why you were prompted as that should be off by default. Settings are available by pressing Ctrl+Shift+P and searching for User Settings (UI) and then editing the PowerShell Universal settings.

You can also hook it up to your VS Code instance by clicking this in the admin console.

All this does it set an app token in the extension for communicating with the REST API.

image

I realize you might be fed up with the platform but I figured I’d try to address some of your frustrations. If you ever want to jump on a call and rant directly to me, that would be good feedback for me to hear and maybe I can help you get up and running.

Thanks,
Adam

4 Likes

When I first started using the product, it seems I took the opposite approach you did. I installed it, and started writing Dashboards and Scripts using the code editor windows in the GUI. If I wanted to use existing code I manually installed modules on the server, or dot-sourced files containing functions (which I had copied to a location on the server) at the beginning of the Script / Dashboard I was making.

In this way, I quickly produced some nice-looking dashboards and easily convinced management (not to mention myself) the product would be valuable. Only later did I slowly mature how we used the product.

So my advice would be to ditch VS Code, Git integration, etc. Just install it, go into the web admin portal and start writing a simple dashboard. The other stuff can work and people use it. But walk before you run.

Oh my god. I spent 6 hours yesterday failing to get VSCode and localhost:5000 (edit: actually I can’t get it to work with localhost, I have to use my pc’s IP address directly) to correctly talk to each other. Nothing worked, every suggestion and step failed.

All it required was clicking “Edit with VS Code” button on PU dashboard.

This is the step that should probably be in the documentation. :wink:

This. I convinced my management going this route. Forums have been a great help and the additional support through email is also nice! @adam does an awesome job and very happy with our purchase. We have an enterprise license, and I run about 12 dashboards with about 20 scripts on a schedule. I have still yet to fully use everything in the bundle, like recently Adam showed me about how triggers can be used to kick off another script!

This was awesome because I build some APIs that needed managing, so I built a dashboard interface to manage these, along with report the results from the API. There are scripts that query the results and dump it into a database, then when that script is complete a trigger kicks off an alert script to notify us if there is any issues. :slight_smile:

I can not stress enough you have to walk through it, then you will run. Try building a sample dashboard? There is a learning curve to use the cmdlets. As far as modules go, I defined a resource folder and then import my modules that way.

2 Likes

First off, thank you for countering my frustration with professionalism and courtesy. Here’s what I’ve arrived at so far:

  1. Git integration is broken - Turning on TwoWay integration causes the product to crash, and getting the product to sync in the first place is a real headache. I can manage Git versioning of the repository myself. No big deal.

  2. Storage of modular components like functions - Part of my expectations on this came from my experience with vRealize Orchestrator - vRO has “Actions” that are essentially functions that can be called either inside the script or inside a graphical workflow. I am happy to keep functions in a separate “uncatalogued” (not tracked in the GUI) file inside the repository. I even went so far as to learn how to write proper PowerShell modules.

  3. VS Code extension - Figuring out the proper configuration with regard to executable path and starting the service was a pain, mostly triggered by the alerts that the extension was producing. That is a brief headache. Also, one of the issues I encountered was confusion on my part - as documented, you can create new endpoints by simply adding them to the endpoints.ps1 file and refreshing. By extension, I thought I could take a similar approach to scripts, but this will crash PSU if the script file doesn’t already exist. The VS Code extension also has the following issues on my machine:

  • Clicking on “Manage Scripts” in the Automation pane opens the incorrect URL, producing a Page Not Found error
  • Clicking the + next to any of the samples in the sample browser doesn’t do anything other than open the associated configuration file. For instance, clicking the + on an API sample just opens endpoints.ps1. Nothing else. No code is inserted.

Regarding documentation, the biggest issue I had is the amount of outdated information available and the prevalence of outdated information in search engine rankings! I can’t tell you how many times I got confused because I searched for PowerShell Universal and clicked on the result only to realize later that I was looking at the documentation for Universal Dashboard. Searching for “powershell universal dashboard functions” leads immediately to the Endpoints page for Universal Dashboard. The look and feel of the pages is the same as the PowerShell Universal documentation. I only now realized the notice at the top of the page indicating that I wasn’t looking in the right place. I think maybe the documentation needs pruning and search rankings need tweaking, if that’s even possible.

After learning and adapting to all of that, I am left with this show-stopping problem: Attempting to run commands from PowerCLI results in an error that I currently don’t know how to address. If I run the following script:

Write-Host "Test"

$env:PSModulePath = $env:PSModulePath + "$([System.IO.Path]::PathSeparator)$modulePath"

import-module VMware.PowerCLI
import-module $PSScriptRoot\connect-vcenter

Set-PowerCLIConfiguration -ParticipateInCEIP $false -InvalidCertificateAction Ignore 

connect-vcenter s1-vc01a.prod.paneravirt.com $admjosbaker

get-vm shr* | select Name

I get the error shown below after the modules load. This does not happen in vanilla PowerShell, and I can’t find any effective guidance on the error.

Sep 13, 2021 10:14 AM [error] Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
1 Like

With regard to “walk before you run”:

I wanted to verify that I could store my code safely and ensure that I could reuse my existing code before I got too deep into the product. I don’t really think either of those should really be considered “running”. These are foundational to development.

As for the VS Code extension, the page on blog.ironmansoftware.com says “This extension provides some features to make it easier to get up and running with Universal and initially aids in authoring dashboards.” Given that description, I wanted to see if it might help me make sense of the conflicting information I was encountering on the web, and perhaps overcome the technical issues I was encountering.

@adamdriscoll
Can you make a new GitHub Issue Template and Label for website and docs issues?

I haven’t been taking many notes but I will in future and will report more doc issues as I discover them if you like but I don’t want to make too much noise on the PowerShell Universal label.

Very true. You are 100% correct, I probably did not word that the best way.

I know it is double the work, but we currently copy the current script or dashboard script to the interface from our git repo. I need to honestly take the time to do that, just budgets were getting finalized and if we wanted the product, we needed to be able to demo something. So we just went with it, now we have been using it for about 4 months solid. There is still areas I have yet to explore and my bosses & I are very happy with the purchase. :slight_smile:

Okay, so I was able to work past that bug from the Set-PowerCLIConfiguration cmdlet - PowerCLI cmdlets have been throwing that bug under various circumstances for a long time. In this case, I had the PowerCLI modules installed in the User scope, and I was setting the module location to the folder containing my personal modules. I removed PowerCLI and reinstalled it in the AllUsers scope, and I was able to use it successfully.

Now my test code looks like this and returns what I expect:

Write-Host "Test"

import-module VMware.PowerCLI
import-module $PSScriptRoot\connect-vcenter

Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Scope User -InvalidCertificateAction Ignore -ParticipateInCEIP $false -Confirm:$false

connect-viserver <hostname redacted> -credential <credentialredacted>

get-vm shr* | select Name

I’m also going to be using the following forum post to get up and running with PowerCLI inside of PSU:
Work with VMware vCenter connections - Universal Dashboard / Cookbook - Ironman Software Forums

My apologies for my frustrated rant - a lot of what I expected out of your product was based on my experience with vRealize Orchestrator. Now that I understand what all it does, I’m going to keep plugging away and attempt to get this thing going.

Thanks for your help!

3 Likes