App Test Environment with Publish to Live?

Product: PowerShell Universal
Version: 4.1.8

Is there any way to create a Test/UAT App? that when ready, can be published to the Production app?
I have it hosted on a Windows Server as a service if that makes a different?

If not, is it possible to have a separate script that would do it based on copying files from the test app directory to the live app directory? i could in theory then create an app that would have the ability to process this but would need to know if that would work and what files/directories would need to be copied over?


Use a DevOps solution like Jenkins or azure DevOps.

Create a docker environment for each environment. You can create using Dev (I use docker on my laptop), push the code to test, then push the code to prod.

Thank you for your response, i actually came across the GIT sync feature which has done the trick.

Only issue i have now is scheduled jobs, i have to unpause them in dev for them to be live in prod but remember to pause them after pushing to git otherwise each of the scripts run twice at the same time from different servers.

Is there a built in method of handling this so that the job schedule can be off in dev but on in prod?

The only idea i have at the moment is adding a check in the script that runs to save if im running on server name x, do nothing but not sure if thats a little hacky.

In my docker container I pass an environment variable:

      - Platform=Dev

I then wrap anything I don’t want to run in dev in an if statement:

if ($env:platform -eq "Dev") {
#do this
else {
#do this