PowerShell Universal 1.2

Wooo! Today is the day! Another cool release of PowerShell Universal. There was a big focus on UD this release. We spent a bunch of time getting UDv2 more up to snuff and getting UDv3 one step closer to GA.

Here’s a blog post on the latest.

My favorite new thing is the idempotent configurations. Here’s an example of what the looks like: https://github.com/ironmansoftware/universal-templates/tree/master/active-directory

Don’t use that AD one yet. It doesn’t totally work but it’s a good example of what the configurations look like. I’m going to convert it to v3.

When you change configurations, it will autoreload the whole platform. That means if you make changes to your dashboard, authorization policies, etc…it will just reload and you can test out your changes. Great for rapid development!

As many have asked, I’ve also published new Universal and UniversalDashboard modules so you can install those and get IntelliSense in VS Code.

Please feel free to file issues you find!

Hi Adam, what is the credential for 1.2? I upgraded from 1.1 and now can’t login

Hi @Icho,

The login user name is Admin and any password. If you still cannot login please send me the logs in C:\ProgramData\PowerShellUniversal and I can take a look.

I seem to be hitting a wall on upgrading my IIS to 1.2. I maintained only the web.config file and copied over all the new stuff. restarted IIS and now meet " HTTP Error 500.30 - ANCM In-Process Start Failure". I had thought it was because I attempted to setup WSFed settings at the same time, but I disabled those and no change.

Eventlog shows these errors:

NET Runtime ID 1026:

Application: w3wp.exe
CoreCLR Version: 4.700.19.56402
.NET Core Version: 3.1.0
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception: Error while deserializing. Object reference not set to an instance of an object.
   at UniversalAutomation.PowerShellSerializer`1.Deserialize(String script, IDatabase database) in E:\src\universal\src\UniversalAutomation\Services\PowerShellSerializer.cs:line 31
   at UniversalAutomation.Services.UniversalConfigurationService.Read[T](Func`2 includes) in E:\src\universal\src\UniversalAutomation\Services\UniversalConfigurationService.cs:line 241
   at UniversalAutomation.Services.UniversalConfigurationService.SyncAsync() in E:\src\universal\src\UniversalAutomation\Services\UniversalConfigurationService.cs:line 223
   at UniversalAutomation.StartupService.StartAsync(CancellationToken cancellationToken) in E:\src\universal\src\Universal.Server\Services\StartupService.cs:line 64
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at Universal.Server.Program.Main(String[] args) in E:\src\universal\src\Universal.Server\Program.cs:line 30

IIS AspNetCore Module V2 ID 1018:

Application '/LM/W3SVC/3/ROOT' with physical root 'C:\inetpub\PSUniversal\' hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs:
2020-06-09 10:34:29 [INFO]  (Hangfire.BackgroundJobServer) Starting Hangfire Server using job storage: 'Hangfire.MemoryStorage.MemoryStorage'
2020-06-09 10:34:29 [INFO]  (Hangfire.BackgroundJobServer) Using the following options for Hangfire Server:
    Worker count: 10
    Listening queues: 'default'
    Shutdown timeout: 00:00:15
    Schedule polling interval: 00:00:15
2020-06-09 10:34:30 [INFO]  (Hangfire.Server.BackgroundServerProcess) Server wfawkr01:9964:d2d33379 successfully announced in 188.134 ms
2020-06-09 10:34:30 [INFO]  (Hangfire.Server.BackgroundServerProcess) Server wfawkr01:9964:d2d33379 is starting the registered dispatchers: ServerWatchdog, ServerJobCancellationWatcher, ExpirationManager, CountersAggregator, Worker, DelayedJobScheduler, RecurringJobScheduler...
2020-06-09 10:34:30 [INFO]  (Hangfire.Server.BackgroundServerProcess) Server wfawkr01:9964:d2d33379 all the dispatchers started
info: UniversalAutomation.JobProcessManager[0]
      Starting C:\Program Files\PowerShell\7\pwsh.exe with command line -NoProfile -NoExit -Command "& { [System.Reflection.Assembly]::LoadFrom('C:\inetpub\PSUniversal\Host.dll') | Out-Null; [UniversalHost.AgentService]::StartSecurity(64101, 9964) }"
info: UniversalAutomation.JobProcessManager[0]
      Starting job using Process.
info: Universal.Server.Services.SecurityProxy[0]
      Port set to 64102
info: UniversalAutomation.JobProcessManager[0]
      Starting C:\Program Files\PowerShell\7\pwsh.exe with command line -NoProfile -NoExit -Command "& { [System.Reflection.Assembly]::LoadFrom('C:\inetpub\PSUniversal\Host.dll') | Out-Null; [UniversalHost.AgentService]::StartApi(64104, 9964) }"
info: UniversalAutomation.JobProcessManager[0]
      Starting job using Process.
2020-06-09 10:34:35 [INFO]  (Hangfire.Server.BackgroundServerProcess) Server wfawkr01:9964:d2d33379 caught stopping signal...
2020-06-09 10:34:35 [INFO]  (Hangfire.Server.BackgroundServerProcess) Server wfawkr01:9964:d2d33379 caught stopped signal...
2020-06-09 10:34:35 [INFO]  (Hangfire.Server.BackgroundServerProcess) Server wfawkr01:9964:d2d33379 All dispatchers stopped
2020-06-09 10:34:35 [INFO]  (Hangfire.Server.BackgroundServerProcess) Server wfawkr01:9964:d2d33379 successfully reported itself as stopped in 0.8024 ms
2020-06-09 10:34:35 [INFO]  (Hangfire.Server.BackgroundServerProcess) Server wfawkr01:9964:d2d33379 has been stopped in total 6.2598 ms
Unhandled exception. System.Exception: Error while deserializing. Object reference not set to an instance of an object.
   at UniversalAutomation.PowerShellSerializer`1.Deserialize(String script, IDatabase database) in E:\src\universal\src\UniversalAutomation\Services\PowerShellSerializer.cs:line 31
   at UniversalAutomation.Services.UniversalConfigurationService.Read[T](Func`2 includes) in E:\src\universal\src\UniversalAutomation\Services\UniversalConfigurationService.cs:line 241
   at UniversalAutomation.Services.UniversalConfigurationService.SyncAsync() in E:\src\universal\src\UniversalAutomation\Services\UniversalConfigurationService.cs:line 223
   at UniversalAutomation.StartupService.StartAsync(CancellationToken cancellationToken) in E:\src\universal\src\Universal.Server\Services\StartupService.cs:line 64
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at Universal.Server.Program.Main(String[] args) in E:\src\universal\src\Universal.Server\Program.cs:line 30

IIS AspNetCore Module V2 ID 1007:

Application '/LM/W3SVC/3/ROOT' with physical root 'C:\inetpub\PSUniversal\' failed to load coreclr. Exception message:
CLR worker thread exited prematurely

Looks like it’s unhappy with one of the PS1 files in the repository directory that I just mentioned in the previous comment.

Can you send me a zip of that directory? I’d be happy to take a peek and hopefully, we can just tweak what’s wrong.

Feel free to DM or email me if you can’t share it publicly.

I cleared my dashboards and scripts from the respective config ps1s and it started up. I had commented out my LDAP auth/role code but that had no result. However, the Security pane is not loading up it seems like. Still investigating.

Went to re-add my dashboards back, but I noticed that there is no longer a path field when adding a dashboard. Is this by design?

See my response here: Powershell Universal - Add Dashboard

I’ll get an “Import Dashboard” button added for the next version.

1 Like