![]() ![]() I have also created a script for getting computer names from System Center Virtual Machine Manager (both hosts and virtual machines), which can be used to populate a dynamic folder: ![]() When the script is customized and verified, paste it in the Dynamic Folder Script window and click OK:Īfter re-loading the document, you should now see server computer accounts from Active Directory: I am using the script from a non-domain joined laptop, hence I need to specify credentials. ![]() You may also want to customize options such as domain name and credentials. I would recommend to first run the script manually in order to verify that data can be retrieved from Active Directory. This will retrieve computer accounts with an operating system name starting with Windows Server*, exclude Cluster Name Objects and include computer accounts which have logged on during the last number of days specified (30 is the default). I am re-using an existing function I have created called Get-ServerFromAD. You can use your existing skills for retrieving the computer accounts you want from Active Directory. 0Ī Royal TS community member has created a YouTube video explaining more details about retrieving data from Active Directory for building a dynamic folder in Royal TS, such as building the Dynamic Folder sub folder structure based on the Organizational Unit structure the computer objects is retrieved from. In order to populate the dynamic folder with our own data using PowerShell, we can build custom objects with the necessary properties:Īdd-WindowsCapability -Online -Name Rsat. _ – If checked, Royal TS will save (cache) the contents of this dynamic folder within the document._īy default, none of the two options is enabled. ![]() _ – If checked, Royal TS will automatically reload the folder contents when the document is opened._ When right-clicking the folder we create, we can see that we have the option of reloading the folder:Ĭlicking this will trigger the PowerShell script we just saw on the Dynamic Folder Script window, and the folder should now look like this when using the provided example script.Īccording to the documentation, there are two options available for reloading a dynamic folder: You will get an example script which shows what kind of objects is expected, as well as how to convert them to JSON (which is the output format Royal TS expects):Īfter modifying the options, such as credentials, click OK. On the Dynamic Folder Script window, we can choose PowerShell to be the script interpreter: Give it a meaningful name, such as the source we are going to dynamically retrieve data from: We start by creating a new folder of the Dynamic Folder type: The new Dynamic Folder Script feature allows you to configure a script and the interpreter which populates the dynamic folder content. This was very useful as the script could be scheduled to update a Royal TS connections document, for example on a daily basis. In that article I’ve showcased a script called Update-RoyalFolder.ps1, which could replicate server computer objects from a specified Active Directory domain or Organizational Unit (OU). Previously, I have written an article covering a PowerShell module for managing Royal TS Documents which is built in to Royal TS. In this article we will look at a new feature introduced in Royal TS 5.0 (released in December 2018) called dynamic folders. Royal TS is a powerful tool for managing remote systems using many different protocols such as Remote Desktop (RDP), PowerShell, SSH, HTTPS, and many more. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |