Support

Get help with Devolutions PowerShell Universal.

avatar

Adam Driscoll

About the Documentation category

Welcome to the PowerShell Universal documentation! This category is a clone of the PowerShell Universal docs and auto-generated based on the markdown files. Edits should not be made directly in the posts. Please report any issues to the docs repository .

1

0

avatar

(anonymous user)

How to organize an APP page

Very new to Powershell Universal ...as in got it installed this week. We are still using an unlicensed version until I can prove out that it can do all that we need done. The first thing I'm working on is an APP that will collect parameters to be fed via Invoke-PSUScript to an automation Script. I am figuring that part out fairly well. What I can’t figure out is how to organize the actual app webpage. My example dummy script so far New-UDApp -Content { New-UDSelect -ID "Number" -Label 'Number' -Option { New-UDSelectOption -Name "One" -Value 1 New-UDSelectOption -Name "Two" -Value 2 New-UDSelectOption -Name "Three" -Value 3 } New-UDSelect -ID "word" -Label 'word' -Option { New-UDSelectOption -Name "One" -Value "Hello" New-UDSelectOption -Name "Two" -Value "GoodBye" New-UDSelectOption -Name "Three" -Value "No one is home" } New-UDButton -Text "Run Script" -OnClick { $value = (Get-UDElement -ID "Number").value $value2 = (Get-UDElement -ID "word").value Invoke-PSUScript -Name "test.ps1" -value $value -word $value2 -Integrated -Wait } -ShowLoading } So in this case when i “view app” it just stacks Number / Word / Run Script (click button) next to each other. I assume there has to be a way that I could say place "Number in top left of page, Word in top right and ‘Run Script’ click bottom in bottom left. How do you say where things go rather than just letting them stack up next to each other?

32

1

avatar

(anonymous user)

avatar

(anonymous user)

BUG: FilterType 'autocomplete' crashes with React forEach error when Sync-UDElement is called while filter is active

Product: PowerShell Universal Version: 2026.1.3 BUG Hey everyone, Found a bug in v2026.1.3 with -FilterType autocomplete (and -FilterType select) on a New-UDTableColumn when used inside a New-UDDynamic with -LoadData. The error: TypeError: Cannot read properties of undefined (reading ‘forEach’) at filters.js:209:19 at Object.autocomplete (filters.js:207:16) at Filter (utilities.js:101:62) at dynamic.jsx:17 ← PSU’s own Dynamic component To reproduce: Apply the autocomplete filter and select a value Click any button that calls Sync-UDElement on the parent Dynamic React crashes Minimal repro — paste this into a new page: $Pages += New-UDPage -Name ‘Bug Repro’ -Url ‘bug-repro’ -Content { $Cache:BugReproData = @( [PSCustomObject]@{ COMPANY_NAME = 'Contoso Ltd'; NAME = 'John Smith'; ID = '001' } [PSCustomObject]@{ COMPANY_NAME = 'Contoso Ltd'; NAME = 'Jane Doe'; ID = '002' } [PSCustomObject]@{ COMPANY_NAME = 'Fabrikam Inc'; NAME = 'Bob Jones'; ID = '003' } [PSCustomObject]@{ COMPANY_NAME = 'Fabrikam Inc'; NAME = 'Alice Brown'; ID = '004' } [PSCustomObject]@{ COMPANY_NAME = 'Northwind Corp'; NAME = 'Charlie Day'; ID = '005' } ) # Clicking this while a filter is active triggers the crash New-UDButton -Text 'Sync (triggers crash if filter active)' -OnClick { Sync-UDElement -Id 'dynTable' } New-UDDynamic -Id 'dynTable' -Content { New-UDTable -Id 'tblRepro' -ShowFilter -ShowSelection -Dense -LoadData { $TableData = ConvertFrom-Json $Body $allFilters = @($TableData.filters) $filterCompany = $allFilters | Where-Object { $_.id -eq 'company_name' } $filteredData = @($Cache:BugReproData) if ($filterCompany -and ![string]::IsNullOrEmpty($filterCompany.value)) { $filteredData = @($filteredData | Where-Object { $_.COMPANY_NAME -eq $filterCompany.value }) } $filteredData | Out-UDTableData ` -Page $TableData.page ` -TotalCount $filteredData.Count ` -Properties $TableData.properties } -Columns @( # ← Change to -FilterType text to confirm the bug is filter-type specific New-UDTableColumn -Property 'COMPANY_NAME' -Title 'Company Name' ` -ShowFilter -FilterType autocomplete New-UDTableColumn -Property 'NAME' -Title 'Name' New-UDTableColumn -Property 'ID' -Title 'ID' ) } } Notes: Works fine with no filter active when Sync fires Works fine with -FilterType text Passing explicit -Options to the column does not help Both autocomplete and select filter types are affected Workaround (until fixed): New-UDTableColumn -Property ‘COMPANY_NAME’ -Title ‘Company Name’ ` -ShowFilter -FilterType text Has anyone else hit this? Hoping the team can fix the unguarded .forEach() call in filters.js:209.

16

0

avatar

steven09

Resolved

Developer License: what needs to be done if hosting on docker behind proxy server

Yesterday I wanted to apply for the developers license but I am kinda stuck at what to do to get that process to work. Just some background info that might help or make a difference: I’m running PSU on Docker behind a reverse proxy (Godoxy) No ports are exposed as the reverse proxy routes traffic to PSU in the container on port 5000 The only entrance via the reverse proxy is port 443 I was previously running PSU with ironmansoftware/universal:latest I switched yesterday evening to devolutions/powershell-universal:latest Version now shows : 2026.1.6 The reverse proxy protects PSU access by having Authentik involved as OIDC (configured in the reverse proxy settings, not PSU) I looked at the documentation on licensing: https://docs.powershelluniversal.com/licensing#static-login-port In that document it states I need to set this: { “PSULoginPort”: 60370 } To be honest, I have no clue where to set this and the documentation does not seem to mention this either. And then there is the fact I cannot reach that port anyway, there are layers of security around the setup of docker and containers that prevent opening ports to the public. The DNS does have anything regarding that port, the reverse proxy know nothing about that port, the docker compose has no port exposure, the container access is protected by OIDC via the reverse proxy so you need to authenticate before you can reach PSU on my docker env, that sort of thing. And then there is the fact that I have no clue why I would need to open that port anyway, it feels like a bit of overreach to ask people to expose a port to the internet and bypass all protective layers. And is there any documentation or statement from PSU/Devolutions on what will be sent back and forth? Can I close that port once the developer license is pulled in the PSU environment? So if I click the button “Login with Devolutions Account” I get this message in my browser: Firefox can’t connect to the server at 127.0.0.1:60370 So the question now is: what do I need to do to get that developers license? Is there a way to just login to the Devolutions website with my account (which I have) and generate/get a license that I can apply to PSU myself? That would be infinitely easier and more secure than opening port(s) or having some back-and-forth between my PSU container and some server from Devolutions. This process ‘feels’ a bit more complex then it should be, but that could be for a reason I am not aware of. Now I am assuming a lot here, about opening ports, listening servers and whatnot but that is because I have no clue what is needed and what will happen in the background once I (if indeed needed of course) open an unprotected port to the internet. Some clarity on the correct needed setup, the routes of traffic involved so I can understand what would be needed and what the impact is. In my case the involved parts are: DNS, Docker (compose), reverse proxy and Authentik Any help on this would be appreciated! PS: once I started using the image from devolutions/powershell-universal:latest I see a lot of messages like this in the logs of PSU: [10:48:06 INF] Microsoft.AspNetCore.Hosting.Diagnostics Request starting HTTP/1.1 HEAD http://172.18.0.22:5000/ - null null │ │ [10:48:06 INF] Microsoft.AspNetCore.Mvc.ChallengeResult Executing ChallengeResult with authentication schemes ( ). │ │ [10:48:06 INF] Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler AuthenticationScheme: Cookies was challenged. │ │ [10:48:06 INF] Microsoft.AspNetCore.Hosting.Diagnostics Request finished HTTP/1.1 HEAD http://172.18.0.22:5000/ - 302 null null 32.821ms │ │ [10:48:11 INF] Microsoft.AspNetCore.Hosting.Diagnostics Request starting HTTP/1.1 HEAD http://172.18.0.22:5000/ - null null │ │ [10:48:11 INF] Microsoft.AspNetCore.Mvc.ChallengeResult Executing ChallengeResult with authentication schemes ( Is this to be expected? Perhaps it is meant to be, no idea here.

Recommended Answer

7 days ago

I have confirmed with Adam that the Developer License flow is intended for local editing, not remote access. PSULoginPort is the intended setting for your scenario, but it only makes the local login port static. It does not change the loopback host from 127.0.0.1 . The documentation was a little unclear on this and it will be fixed this week. Sorry about the confusions.

74

7

avatar

steven09

avatar

sam04

Portal Homepage Custom Links

Product: PowerShell Universal Version: 2026.1.2 I’d like to add custom links to the portal home page. Either in the top bar or in the left nav. I have not found a way to do this. I attempted to see if I could add html to some of the branding fields and that did not work. Is there any way to make this work without adding a custom page or app?

69

3

avatar

ron01

avatar

matthew14

Running a script with gMSA

Product: PowerShell Universal Version: 5.4.1 IIS Install/SQL Express AppPool ID: LocalSystem Greetings, first post here! I am struggling through the initial learning curve of PSU and trying to use a gMSA to run a script. I’m experienced in the ways of gMSA, so it’s been properly created and the local machine has rights to retrieve the password. The account has both “Log on as a batch job” and “Log on as a service” rights. I’ve registered the gMSA as a PSCredential variable (DOMAIN\user$), and checked the box for “Password not required”. No test can be performed on the credential, as for standard accounts. I assume this is a limitation of gMSAs. I can select the credential in the script properties. All good. But when running the script, I get: Error executing job: Failed to login user (1326). System.ComponentModel.Win32Exception (1326): The user name or password is incorrect. In the Windows Security Log, I see confirmation that IIS is initiating the logon, but finding “Unknown user name or bad password”: Subject: Security ID: SYSTEM Account Name: MYCOMPUTER$ Account Domain: MYDOMAIN Logon ID: 0x3E7 Logon Type: 4 Account For Which Logon Failed: Security ID: NULL SID Account Name: svc_gMSA$ Account Domain: MYDOMAIN Failure Information: Failure Reason: Unknown user name or bad password. Status: 0xC000006D Sub Status: 0xC000006A Process Information: Caller Process ID: 0x1048 Caller Process Name: C:\Windows\System32\inetsrv\w3wp.exe The IIS app pool is running under LocalSystem. From the docs I am understanding that if I were to run it under a custom service account, then I could not use alternate credentials. How does one get this working? Thank you! Just to cover a few additional bases: forwardWindowsAuthToken is set to “true” Using a standard AD account as alternate credentials works fine Tried granting additional User Rights in Local Security Policy: Impersonate a client after authentication, Replace a process level token, Obtain an impersonation token for another user in the same session

842

5

avatar

(anonymous user)

avatar

(anonymous user)

Query dictionary and Invoke-UDEndpoint OnClick behavior

Product: PowerShell Universal Version: 4.2.7 Greetings, I’m working on an app to pull information from various APIs for a single workstation. I want to be able to pass the workstation name into the UD app via URL using the "?workstationname=WORKSTATIONNAME" query. If the query was used I’d like it to populate the textbox with the machine name that was passed in and automatically execute the contents of the button’s -OnClick scriptblock. I’d also like the page to be able to be used manually where a user would enter the workstation name, then click the button and get the same information as if there had been a device name passed in via the query. I’m seeing some pretty strange behavior from how I’ve implemented, though, and am at a bit of a loss. I’ve tried multiple rewrites and different placements and organizations of the various pieces of logic that do what I want to no avail. The first code block below seems to work the first time the page is deployed (when I click save in the PSU app “Code” window) but does not work subsequent times until it’s redeployed again. On subsequent runs the $workstationName variable is null and isn’t passed into the body of the code. Also of note; this doesn’t seem to work at all if I splat the New-UDApp params (the second code block), which would be my preferred method of creating my apps for the sake of clarity and future management. The $workstationName variable is always null. Both of these work as expected when the button is clicked, both in the stripped-down code below and my actual code. Am I missing knowledge on something to do with the session or page variable scopes? I’m relatively new to PSU and don’t quite understand the idea of using different pages or endpoints in the scope of PSU yet. https://FQDN/stuff?workstationname=WORKSTATIONNAME Works when saved/redeployed the first time, then does not work subsequent times. New-UDApp -Title "Workstation Info" -Content { New-UDLayout -Columns 5 -Content { New-UDPaper -Id "inputPaper" -Content { New-UDElement -Tag "span" -Content { New-UDStack -Direction Row -Spacing 2 -Content { If (-not [String]::IsNullOrEmpty($Query["workstationname"])) { New-UDTextbox -Id "workstationTextbox" -Label "Workstation" -Value $Query["workstationname"] } Else { New-UDTextbox -Id "workstationTextbox" -Label "Workstation" -Placeholder "5CG123XXX" -Autofocus } New-UDButton -Id "buttonStart" -Style $buttonStyleStart -Text "GO" -ShowLoading -OnClick { $workstationName = (Get-UDElement -Id "workstationTextbox").Value Show-UDToast -Message $workstationName # Lots of other stuff } } If(-not [String]::IsNullOrEmpty($Query["workstationname"])) { Invoke-UDEndpoint -Id "buttonStart" -Session } } } } } Never works: $newUdAppParams = @{ Theme = @{ palette = @{ background = @{ default = "#ADADAD" } } } Title = "Workstation Info" Logo = "" HeaderContent = { New-UDButton -Icon (New-UDIcon -Icon "Home") -Text "Home" -Style @{background = "#1A3A6A" } -OnClick { Invoke-UDRedirect -Native "/home" } } HeaderBackgroundColor = "#FFFFFF" HeaderColor = "#000000" DisableThemeToggle = $true Content = { New-UDLayout -Columns 5 -Content { New-UDPaper -Id "inputPaper" -Content { New-UDElement -Tag "span" -Content { New-UDStack -Direction Row -Spacing 2 -Content { If (-not [String]::IsNullOrEmpty($Query["workstationname"])) { New-UDTextbox -Id "workstationTextbox" -Label "Workstation" -Value $Query["workstationname"] } Else { New-UDTextbox -Id "workstationTextbox" -Label "Workstation" -Placeholder "5CG123XXX" -Autofocus } New-UDButton -Id "buttonStart" -Style $buttonStyleStart -Text "GO" -ShowLoading -OnClick { $workstationName = (Get-UDElement -Id "workstationTextbox").Value Show-UDToast -Message $workstationName # Lots of other stuff } } If(-not [String]::IsNullOrEmpty($Query["workstationname"])) { Invoke-UDEndpoint -Id "buttonStart" -Session } } } } } } New-UDApp @newUdAppParams

223

1

avatar

(anonymous user)

avatar

(anonymous user)

No data from database

Product: PowerShell Universal Version: 2026 I've been developing this App to retrieve polybase informatin from my SQL 2025 database. No matter what I do I can't get it to show any data. What do I need to do to fix it? New-UDApp -Title "SQL 2025 PolyBase Manager" -Content { Import-Module SqlServer -ErrorAction SilentlyContinue New-UDTabs -Tabs { New-UDTab -Text "External Sources" -Content { New-UDTable -Id 'dsTable' -LoadData { # 1. Force module loading in the background thread Import-Module SqlServer -ErrorAction SilentlyContinue try { # 2. Use $using: to pull the global connection string $Conn = $using:PolyBaseConnectionString # 3. Fetch data $Query = "SELECT name, location FROM sys.external_data_sources" $Data = Invoke-Sqlcmd -ConnectionString $Conn -Query $Query -ErrorAction Stop # 4. Construct a clean array (Never $null) $FinalRows = if ($null -eq $Data) { @() } else { @($Data) } # 5. EXPLICIT BINDER: Do not use the pipeline (|) # This satisfies the 'Properties' mandatory check manually Out-UDTableData -Data $FinalRows -Page $EventData.Page -TotalCount $FinalRows.Count } catch { # Safety fallback to prevent the red toast Out-UDTableData -Data @() -Page 0 -TotalCount 0 } } -Columns @( New-UDTableColumn -Property "name" -Title "Source" New-UDTableColumn -Property "location" -Title "Path" ) } New-UDTab -Text "External Credentials" -Content { New-UDButton -Text "Create New Credential" -OnClick { # Documentation: Must use -Header, not -Title Show-UDModal -Header "New Database Scoped Credential" -Content { New-UDForm -Content { New-UDTextbox -Id "cName" -Label "Name" New-UDTextbox -Id "cId" -Label "Identity" New-UDTextbox -Id "cSec" -Label "Secret" -Type "password" } -OnSubmit { try { $Sql = "CREATE DATABASE SCOPED CREDENTIAL [$($EventData.cName)] WITH IDENTITY = N'$($EventData.cId)', SECRET = N'$($EventData.cSec)';" Invoke-Sqlcmd -ConnectionString $PolyBaseConnectionString -Query $Sql -ErrorAction Stop Show-UDToast -Message "Success" -Severity success Sync-UDTable -Id 'credTable' Hide-UDModal } catch { Show-UDToast -Message "Error: $($_.Exception.Message)" -Severity error } } } } New-UDTable -Id 'credTable' -LoadData { Import-Module SqlServer -ErrorAction SilentlyContinue try { $Conn = $using:PolyBaseConnectionString $Data = Invoke-Sqlcmd -ConnectionString $Conn -Query "SELECT name, credential_identity as identity FROM sys.database_scoped_credentials" -ErrorAction Stop $FinalRows = if ($null -eq $Data) { @() } else { @($Data) } Out-UDTableData -Data $FinalRows -Page $EventData.Page -TotalCount $FinalRows.Count } catch { Out-UDTableData -Data @() -Page 0 -TotalCount 0 } } -Columns @( New-UDTableColumn -Property "name" -Title "Name" New-UDTableColumn -Property "identity" -Title "Identity" ) } } }

81

3

avatar

(anonymous user)

avatar

steven09

Pagination through large data set with New-UDDataGrid

Product: PowerShell Universal Version: 2026.1.5 I have a large MySql data set of about 17000 records. As you can imagine, this is not a quick query, especially as the query has 2 columns where a stored function/procedure is called on them. That function is called clean_html The process to cleanup this data on the DB itself is something that will happen in the future but not yet, so I have to clean the text fields like this. I am using New-UDDataGrid to display this data. It also feels like when I press the ‘go to next page’ button this whole LoadRows is executed again? Roughly it looks like this: New-UDDataGrid -LoadRows { $Cred = New-Object System.Management.Automation.PSCredential ($MySql_User,(ConvertTo-SecureString $Secret:MySql_Password -AsPlainText -Force)) $Database = 'dbname' $Conn = [guid]::NewGuid().ToString() Open-MySqlConnection -ConnectionName $Conn -Server $MySql_Host -Database $Database -Credential $Cred -Port $MySql_Port $Sql = "SELECT id, title, ` clean_html(introtext) as introtext_clean, ` clean_html(``fulltext``) as fulltext_clean ` from dbname.tablename ` order by title" $Data = Invoke-SqlQuery -ConnectionName $Conn -Query $Sql -Stream Close-SqlConnection -ConnectionName $Conn Out-UDDataGridData -Data $Data -Context $EventData -TotalRows $Data.Length } -Columns @( New-UDDataGridColumn -Field id New-UDDataGridColumn -Field title -Flex 5 New-UDDataGridColumn -Field introtext_clean -Flex 10 New-UDDataGridColumn -Field fulltext_clean -Flex 15 ) -AutoHeight $true -Pagination -HeaderFilters -PageSize 10 -Density 'Compact' As you can see, the complete data set is retrieved from the table. This takes to long and it feels inefficient to do this. The question is: is there a better way to go through this data?

45

2

avatar

steven09

1 - 25 of 1880 items