A PowerShell-based, extensible management framework for cross-forest Active Directory administration — featuring an interactive text-menu console interface.
- PowerShell 5.1 or PowerShell 7.x (PowerShell Core)
- The ActiveDirectory module (part of RSAT) must be installed on the system.
- Active Directory Web Services (ADWS) must be running on domain controller(s) configured in the module (see step 4 below) and ADWS port (TCP 9389 by default) must be reachable from the system running the module.
- Credentials of an account with administrative privileges or appropriate delegated permissions in the target forests/domains.
-
Install the module from Powershell Gallery
Install-Module -Name X-ADCommander
-
Before using the module, modify Domain_Controllers_IPs.csv in folder "X-ADCommander" under your local AppData folder:
C:\Users\username\AppData\Local\X-ADCommanderto reflect the domain names and IPs of domain controllers for each target domain.
-
Ensure your PowerShell execution policy allows running the module. For example, to set
Bypassfor the current user:Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
-
Import the module
Import-Module X-ADCommander
-
Start the interactive console:
Start-XADCommander
- Run
Start-XADCommanderto launch the menu-driven console. - Use the menus to select domains, and the management tasks you need.
- The module exports functions New-XADDrive and Test-XADDrive that you can directly use in your own scripts.
- Use the following function template to add a new custom function:
function Verb-XADNoun {
param ([Parameter(Mandatory = $true)][string]$Domain)
## Get user input here if needed
Write-Host "`n(Describe action being done) in $Domain Domain..............`n" -ForegroundColor Yellow
try {
## perform main action(s) here (with -ErrorAction Stop)
Write-Host "(action) succeeded in $Domain Domain." -ForegroundColor Green
}
catch {
$ErrorDetails = $_.Exception.Message
Write-Host "Failed to (action). ErrorDetails: $ErrorDetails" -ForegroundColor Red
}
}- Update the file
Level_2_Menus.csvwith a menu name for the new custom function.
- Found a bug or want a feature? Please open an issue on the repository.
- Contributions are welcome — fork the repo, make changes, and submit a pull request.