cleanup_installation.ps1

Two hidden gems of Royal Server can be found in the <Royal-Server-Installation-Directory>/scripts/ folder:

Prepare a server for accepting Management Endpoint based connections (prepare_server.ps1)

In order to manage a Windows server from Royal Server, you need to do two steps:

  1. PS-Remoting needs to be enabled
  2. If the Windows Firewall is enabled it needs to be configured correctly to allow DCOM and WMI traffic

Now, this is not rocket science to do and can easily be done manually. But if you have to manage a lot of servers, you will like the possibility to script this.

Check out the prepare_server.ps1 script – its doing the tasks for you. Of course it first checks, if there is something to do and asks upfront, if it should execute the config-change. The script needs to be run in an elevated PowerShell.

Right now, there is no version that is doing the changes without asking – in an unattended environment. If you are interested in such a script, vote for it on our support portal!

Uninstall Royal Server (cleanup_installation.ps1)

Royal Server is distributed via an msi package. Uninstalling should be simple, right?

Well, besides copying the files, the msi package is only installing the “Royal Server” Windows service. But there are several side effects that Royal Server has when it runs/starts up:

  1. It saves its settings in the Registry
  2. It creates a local user group “Royal Server Users” that is used for “Require Authentication”
  3. It creates a Windows event log “Royal Server Log” that is used for logging
  4. It creates a Windows Firewall rule that allows access to the configured port
  5. It creates a user settings file
  6. In the past we had issues with the msi package not fully removing Royal Server (leaving it with a generic icon in the “Installed Programs” list and unable to be uninstalled)

Again, the script is simple to read and you can do all these steps manually. Or, you just call cleanup_installation.ps1. For each steps, the script first checks if there is work to do and asks for permission before it changes any system state. The script needs to be run in an elevated PowerShell.

Since the script is part of the msi package, it will be removed, if you uninstall Royal Server. So, copy it away upfront 😉

Remark: If you have uninstalled Royal Server already, you can just extract the files from the msi without installing it with the following command:

msiexec /a <path-to-msi> /qb TARGETDIR=<target-dir>

Previous Post Next Post