General User Discussion Thread

I just write down what I see:

  • Set-UASettings seems to nearly never works.
  • UA-Apptoken seems to multiply on daemon restarts for no reason.
  • “-NoProfile” argument for JobExecution doesnt seams to be recognized.
  • “database.db” is always open with write lock. (Will result in OneDrive warnings, If your database.db is one a OneDrive drive.)
  • UDHost generates alot of Windows Warning Events for trying to overwrite the readonly var $Error. (SessionStateUnauthorizedAccessException)
  • Integrated modules sometimes give Enterprise license warning. (Beta or bought) License has to be in enviroment vars.to avoid.

I don’t know if the reason for an above listed behavior is a bug, a feature that is not implemented or I do something wrong.

Some questions:

  • Where can I config the arguments the powershell binary is run with?
  • Will UA be fully integrated in UD? Or are these tools seperated and one should not mix/combine a regular Dashboard with an UA-instance/setup.
  • .ua-Folder sometimes appears in the script folder view.

  • Script removal (Remove-UAScript) from CLI/scripts and GUI doesnt work:
    Tried CLI syntax e.g.: Remove-UAScript -Script (Get-UAScript -id 1) -AppToken $token
    Errors:

  1. Call failed with status code 500 (Internal Server Error): DELETE http://example:10000/api/v1/Script/1
  2. An unhandled exception was thrown by the application. LibGit2Sharp.NotFoundException: could not find ‘C:/Users/x/AppData/Local/UniversalAutomation/Repository/TEst.ps1’ to stat: Das System kann die angegebene Datei nicht finden.)
  • Scripts in the same directory as dashboard.ps1, but outside the regular script folder are getting added to the system.

  • Some CSV history exports (e.g. script tags, job history) generate files with “[object Object]”-entries instead of the requested clear text data/info.

What I understood/realized:

  • database.db is way to volatile to be included in synched repo.

Understanding current Git flow:

  • Currently UA always clones a Git remote repo to: $env:appdata\local\UniversalAutomation
  • Where should I make and commit local file changes? In the checked out productive repo @ $env:appdata?
    or a local, regular clone of the Remote-Repo in my regular (UA) workspace?
  • After committing, where should I push the changes first to? To the remote repo? To the local clone, so it gets synched automatically.
  • Are Git commits ok? Or should I only use the GUI, the REST API and PoSH-cmlets?

Thanks so much for this fantastic feedback! I’ll look at some of the bugs you’ve mentioned and create some issues for them as well as your feature requests.

  • Where can I config the arguments the powershell binary is run with?

This is configurable at the moment. I’ll add the ability to do so.

  • Will UA be fully integrated in UD? Or are these tools seperated and one should not mix/combine a regular Dashboard with an UA-instance/setup.

UA will be it’s own thing but will ship with the UD dashboard you are playing with. There is nothing stopping you from integrating it with UD. We even thought of making some pre-made controls that you can embed in UD for UA.

Git Flow:

If you are using a remote, what I would suggest is that you make changes on a different local than the one that UA is using. Consider the case that UA will likely be running in a different place than there you are editing scripts in production. UA will automatically sync any changes that are pushed to the remote.

After you make changes on your local, push to the remote and UA will automatically sync. GUI\REST API\PoshCmdlet changes are fine too. UA will commit those changes to its local and then push to the remote.

UA doesn’t support handling merge conflicts yet but eventually you’ll be able to customize that.

1 Like

The “DotNetFrameworkVersion” in three .psd1-files is wrong.

  • Files: UniversalAutomation.Dashboard.psd1, UniversalAutomation.psd1, UniversalDashboard.psd1 (Line 45 in all files.)
  • Result: A warning while loading the module, because an import checks fail. Message:
    “Cannot verify the Microsoft .NET Framework version 4.7 because it is not included in the list of permitted versions.”
  • (Looks like) PowerShell expects a long version string like: ‘4.0.30319.42000’. So, the current value: ‘4.7’ (and also the obvious variation: ‘4.7.2’) is not “not valid”.

Here some lines of code that are helpful to launch UA.

The intent is to avoid errors, because of (concurrently) still running, failed or outdated other UA-instances & (sub-) processes:


          if ((Test-Port -ComputerName $HostDNS -Port 10000).PortOpened) {
              Write-Output "WARN: Port 10000 = open, try to kill process."
              $processPID = $($(netstat -aon | findstr "10000")[0] -split '\s+')[-1]
              taskkill /f /pid $processPID
          } else { Write-Output "OK: Port 10000 = closed." }

          if ((Test-Port -ComputerName $HostDNS -Port 10001).PortOpened) {
              Write-Output "Test 1: 10001 = open"
              Get-UDDashboard | Stop-UDDashboard
              if ((Test-Port -ComputerName $HostDNS -Port 10001).PortOpened) {
                  Write-Output "Test 2: 10001 = open"                 
                  Get-Process Powershell -ea SilentlyContinue | Where-Object { $_.ID -ne $pid } | Stop-Process -Force                  
                  if ((Test-Port -ComputerName $HostDNS -Port 10001).PortOpened) {
                      Stop-Process -name conhost, cmd, UniversalDashboard.Server -Force
                      Write-Output "Test 3: 10001 still open. :<"    
                  }
                  else { Write-Output "OK - Test 3: 10001 = closed" }
              }
              else { Write-Output "OK - Test 2: 10001 = closed" }
          }
          else { Write-Output "OK - Test 1: 10001 closed" }

UniversalDashboard.psd1 version in folder “UniversalAutomation.Dashboard” is outdated (2.6).

  • Gets invoked (as dependencie) during startup.
  • Can result in errors depending on module loading sequence. (When using version 2.8 cmdlets.)
  • Can be avoided by reloading 2.8 version (Import-Module UniversalDashboard -Force -MinimumVersion “2.8” -Verbose)

Misc

  • Valid and active “Git Remote Configuration” not visible in GUI. (Displaying: “None Configured”)

  • "PowerShell Versions" section in config tab shows: the first 270 chars of (my) default PowerShell-profile welcome text/banner then a line break, then the correct PSVersion. All other properties (Id, Path & Args) are ok.

  • "PowerShell Versions" edits of entries don’t get saved. New entries are empty, all properties empty. (Not implemented ATM?) Empty object is created in database.

  • https://github.com/julianpaulozzi/LiteDbExplorer is really helpful understanding and changing things in the database.

  • "Invoke-WebRequest" at UniversalAutomation.psm1 line 70 fails on new systems, when Internet Explorer was never started (/fully configured).(WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand)

  • Incomplete Git commits (no commit message) are accepted at the frontend, but then fail when getting commited by the UAServer. “Failed to commit. LibGit2Sharp.EmptyCommitException: No changes.”

  • "UniversalAutomation.psm1" Line 69: “localhost” as servername in the URI is hardcoded. Test will fail, if dashboard get’s bound to another IP that is not localhosts. (Obvious exception: global bounding on all interfaces via 0.0.0.0.)

Improvements this week, we’re really great. Alot of progress.

Will the persitence feature (Windows Service) get fixed in the next time? Or should I/we try to help ourselves alone? By using an alternative like PM2, nssm, winsw, something selfcoded, …)

Thank you for both, for your great work.

I can work on getting the host sorted out this week so you can start a service with UA. Thanks for all the feedback! This is very helpful. I’ve opened issues on GitHub for the problems you ran into.

25. December

Some questions

  • Why is there no “Remove-UAIdentity”?

  • How to disable the default username and password for the UA dashboard?

Some observations

  • “Get-UAIdentity” never displays the “role” property of an identity

  • “Set-UAIdentity” never update changed “role” property of an identity

  • “AppToken Connection Information” tab shows ComputerName-URI without port number

  • “.ua” meta data folder appears again on “Scripts” tab

  • Correct and working “Git Remote Configuration” not shown in “Git details” tab.

  • Changing the Identitiy property name creates either an exception (deleting an Identity works) or no error but changes ignored/unsaved.

  • One object is called “ClaimsPrincipal”, a second: “ClaimsPrinciple” (both are identical and of type “ClaimsPrincipal”).

  • Hardcoded filepath in LogConfiguration.cs (part of UniversalAutomation.dll), the value = “C:\Users\adamr\Desktop\log.txt” -> New user dir gets created :slight_smile:

Some trivia

  • The current version looks more solid and stable. Product is on a very good way.

  • I had some success pushing towards real-world, productive UA/UD-usage at my company.

So my team and me have atleast a real chance to really build: infrastructure, services, tools, etc. on top of UA,UD (and PoSH in general). Which may or may not result in a (full/bigger) business automation platform.

  1. We convinced some non-tech, anti-open source IT managers/directors that UA is worth a try,
    even though it’s open source, doesn’t cost > $200.000 license costs a year and isnt the typical overpriced, uncompleted, untested vaporware they usually buy.
  • And we persuaded the head of IT infrastructure to rollout “Windows Management Framework 5.1” to older servers and to establish a standardized HTTPs WinRM-listener on all the servers we need to manage.

I know that doesnt sound noteworthy to most professionals working in an Windows enviroment.
But only 20 of our 200 servers, had WMF5.1, PowerShell versions were really outdated on > 90% of
the system we have to manage/customize. WinRM-listener were unheard of, to advanced for our unqualified Windows admins. (Most believe in manual labor, RDP into a machine for any trivial task and doing nothing, so they wont break something.)

So with change and now being able to integrate these old legacy servers,
which typically have a high failure rate, minimal to no monitoring and no integration into the current central
IT systems and processes into an UA/UD-plattform over the whole (unintegrated, fragmented) IT eco-system company wide, with the all different windows domains, locations, sub-companies, firewall-rules, GPOs, sub contractors, out-sourced sub-systems, project specific super stupid or legacy
setups, that alone is pure gold to my team. We will save so many time and nerves.

Gaining this accessibility, finally opens the door so we can use PoSH and do the integrations & automations we want to do with UA. (And not just talk about it, only complain about the current bad state of our IT or forever test other state-of-the-art software in some lame Test-VM setup, that has no resemblance to our
situation or requirements.)

  • I wrote a (small) helper module for UA users, I will release that in early Januar. It helps manage creds,
    configuration/global variables, module invocation and has some helper functions to support UA usage (updating release, managing multiple dashboard configurations, deployment and publishing, detecting and stopping froozen instances, …). Nothing special.

  • I didn’t have much time for UA the last week, because I volunteer fulltime for the “Critical Decentralisation
    Cluster” at the Chaos Communication Congress (36c3). Full build-up from empty exhibition hall, to
    complete setup to empty exhibition hall, after tear-down, 16 days.