Our Dynamic Folder toolbox comes with a powerful LAPS sample script, which creates a list of available machines from Active Directory.
To import it, click on Data > Dynamic Folder File (.rdfx) > Microsoft Windows > LAPS April 2023 (Windows PowerShell):
Afterward, fill out the necessary fields in the Custom Properties section, as shown in this example:
In our case, we used the following strings for SearchBase DC=RoyalAppsAD,DC=local
and Filter (OperatingSystem -like "Windows 10*" -or OperatingSystem -like "Windows 11*") -and (Enabled -eq $true)
Once you Reload the Dynamic Folder, a list of all available machines and credentials from Active Directory will be created:
When double-clicking on one of the Remote Desktop objects, the connection will be established automatically, as the Dynamic Credential has been assigned to the corresponding RDP object:
For the Dynamic Folder LAPS sample script to work, a working Active Directory with LAPS configuration environment is mandatory.
More information on the setup process can be found here.