Skip to content

Feature/import ad computers#3368

Open
Tyrix wants to merge 3 commits intoBornToBeRoot:mainfrom
Tyrix:feature/ImportAdComputers
Open

Feature/import ad computers#3368
Tyrix wants to merge 3 commits intoBornToBeRoot:mainfrom
Tyrix:feature/ImportAdComputers

Conversation

@Tyrix
Copy link
Copy Markdown

@Tyrix Tyrix commented Mar 27, 2026

Changes proposed in this pull request

  • Added a new UI flow in the Remote Desktop host view to import computer accounts directly from an on-premises Active Directory via LDAP
  • Introduced ActiveDirectoryComputerSearcher in NETworkManager.Utilities to handle secure AD queries using current Windows credentials
  • Added automatic filtering to skip disabled AD accounts, accounts missing a DNS Host Name, and existing duplicate profiles in the target group
  • Implemented persistent settings to remember the last successful LDAP search base (RemoteDesktop_ActiveDirectoryImportLdapSearchBase) for better UX

Related issue(s)

Copilot generated summary

Provide a Copilot generated summary of the changes in this pull request.

Copilot summary

Summary
Adds Remote Desktop functionality to import computer accounts from an on-premises Active Directory using an LDAP subtree search from a user-supplied search base (OU DN). Imported machines are added to a single target profile group. Each profile is created with Remote Desktop enabled, utilizing the dNSHostName property.

User-visible behavior

  • Adds a toolbar control (domain icon) next to "add profile" on the Remote Desktop host view.
  • Provides inputs for: search base, target group (existing or new), and an option to exclude disabled accounts.
  • Uses current Windows credentials for the LDAP bind.
  • Stores and prefills the last successful LDAP search base.
  • Displays a summary dialog reporting imported accounts, skipped duplicates, and skipped entries lacking a DNS host name.
  • Calls ProfileManager.Save() after a successful import.

Implementation notes

  • LDAP logic is encapsulated in NETworkManager.Utilities.ActiveDirectoryComputerSearcher using System.DirectoryServices.
  • Added a null/empty guard in GroupNameValidator to prevent exceptions on editable group combos.

To-Do

Contributing

By submitting this pull request, I confirm the following:

Tyrix added 3 commits March 27, 2026 11:53
Store RemoteDesktop_ActiveDirectoryImportLdapSearchBase after a successful directory query and prefill the import dialog on next open.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import Active Directory Computers for Remote Desktop

1 participant