The ability to automate Royal TS documents using PowerShell opens up many interesting scenarios.
The code shown in the examples in this article is available in this Gist. When the code has been executed, the changes should be reflected in the UI: We’ll configure the Credential Configuration to “Use credentials from the parent folder” and the Resize mode to “Smart Sizing”: Next, let’s see how we can configure a couple of these properties as an example: All of these properties are available on the object we created a subset of them is visible in the screenshot below:Īn object of the type RoyalRDSConnection is returned when we call the New-RoyalObject and the Set-RoyalObjectValue cmdlets. In the Properties dialog, we can see that there are many options available to configure, such as Remote Desktop Gateway, Window Mode and so on. If we right click the Remote Desktop connection we created and go into Properties, we can also see that the Computer Name is configured with the value we supplied as the URI: When the code is executed, Royal TS opens up, and we can see the new folder and Remote Desktop connection is present: The inline comments should describe what is happening. What we are going to create next is the Servers folder and Remote Desktop connections on the left side. Here is a screenshot of Royal TS 3.0 beta connected to a Server Core instance using Remote Desktop: In order to store the in-memory document to disk we need to use the Out-RoyalDocument cmdlet:īefore we go further, you might want to see how the UI looks like. As described in the Getting Started section of the help file, we first need to create a new RoyalStore in memory before we can use New-RoyalDocument. Next step is to create a Royal Document where we can store connections. However, there are some information in the RoyalTS3.chm file in the Royal TS program folder to help us getting started: There aren’t any help available yet, so we can’t use Get-Help to get more information about the cmdlets.
There are 17 cmdlets in the initial version of this module. In the final version of Royal TS 3.0, the module will hopefully be installed to a proper path specified in $env:PSModulePath variable, so that we don’t need to specify the path manually.Īfter the module is successfully imported, we can explore the available cmdlets:
If you download the ZIP file, you will need to specify the path to the location where the extracted resides.
If you install the MSI file available on the website for the beta version, you can import the module as follows: The PowerShell module, introduced in the beta version of Royal TS 3.0, is available here.
In this article, we are going to focus on the new PowerShell module for managing Royal TS Documents. There are also many other features in Royal TS and you can read more about them on their website. Doing this allows for the JSON output to be formatted correctly for RoyalTS.Royal TS is one of many applications on the market for managing Remote Desktop connections. Using the example provided by RoyalTS as my guide, I noticed the hash table created by the example script had a key of Objects and the value was the array of computer objects in it. Using this as the basis with the knowledge of PowerShell I quickly created a script block which queried my test domain for my servers under the Enterprise Servers OU.
The example provided by Royal for PowerShell shows how to create a credential object, a folder, and a connection to a computer through the terminal. This is useful for learning how to create your object and is a good first step and a nice welcome example from RoyalTS. The examples do not show how to dynamically create JSON files but instead show how to create static ones.
This piqued my curiosity so I downloaded version 5 and started looking at the documentation for the new RoyalJSON specification.īeyond the specifications documentation, there are also examples for all of the supported script interrupters inside of RoyalTS itself. That is until my eyes landed on the line Dynamic Folders and credentials.
Well I’m always interested in the newest versions of applications, especially those that I use on a frequent basis, so I started reading the release notes for version 5.Īt that point nothing jumped out at me saying that this required a full version update. When I opened it up recently I was greeted with a message that the application has been updated to version 5. I have been using Royal TS since version 3 of the application.