POWERSHELL / LOCAL
FreeBeginnerRead-onlylow

Export Active Directory FSMO role holders

Exports all five Active Directory FSMO role holders with domain/forest scope for infrastructure inventory and migration planning.

Generated locally in your browser · Review before running · No tenant access

What this PowerShell script does

Exports all five Active Directory FSMO role holders with domain/forest scope for infrastructure inventory and migration planning.

Requirements

  • CSV output path - Use a new absolute Windows CSV path, for example C:\Temp\opselith-report.csv.

Environment

  • Module: ActiveDirectory
  • Permissions: Read access to Active Directory domain and forest information.
  • Output: CSV report
  • Context: Windows PowerShell 5.1 · Active Directory
  • Risk: Low
Review before you run The template is read-only, but you should still review its scopes, target environment and output before execution.
OPS / WORKSPACE

Ready to generate

Configure Export Active Directory FSMO role holders in the Builder, review the generated PowerShell and run it in your own environment.

Why use this template?

Exports all five Active Directory FSMO role holders with domain/forest scope for infrastructure inventory and migration planning. It is designed as a focused inventory step that you can review and retain locally.

The template uses ActiveDirectory and requires Read access to Active Directory domain and forest information.. Output: CSV report.

Review before running

Read the generated script before execution. Read-only describes the intended Opselith template behavior; your surrounding commands, environment and permissions remain your responsibility.

This Free template is generated locally in your browser.

Generate the script

  1. Open the template in the PowerShell Builder.
  2. Enter the requested values and review modules, permissions, output and risk.
  3. Generate, inspect and save the script before running it in your own administration environment.
Generate Export Active Directory FSMO role holders →
OPS / SCRIPT DETAILS

Script details

Exports all five Active Directory FSMO role holders with domain/forest scope for infrastructure inventory and migration planning. Review these details before generating or running the script.

active-directorydomain-controllersfsmoinfrastructureexport

What it works with

Module: ActiveDirectory

Context: Windows PowerShell 5.1 · Active Directory

Compatibility: Windows PowerShell 5.1 with the ActiveDirectory module is the supported target for this template.

Permissions and impact

Permissions: Directory read access

Risk: Low

Execution impact: Read-only. The script reads configuration or inventory data and does not intentionally create, update or remove objects.

Parameters

  • CSV output path - Use a new absolute Windows CSV path, for example C:\Temp\opselith-report.csv. (Required)

Output

Output: CSV report generated locally by the script.

This template is available in the free library and is generated locally in your browser.

Example use

Exports all five Active Directory FSMO role holders with domain/forest scope for infrastructure inventory and migration planning.

Enter the required values in the Builder, review the generated script and confirm the output before running it.

Before you run: Confirm the required Read access to Active Directory domain and forest information.. Review the generated script and output path, then run it from the documented administrator PowerShell environment.
ValidationRecorded evidenceQA reviewed
Static QAPassed
PSScriptAnalyzerPending
Runtime testedNot yet recorded
Last validatedNot yet recorded

Runtime and community evidence change only after an external tester result is reviewed and accepted for release evidence.

Tester: report a result →
TRUST / EVIDENCERecorded trust facts

Last reviewed: 27 Aug 2026

Analyzer evidence: Awaiting a release PSScriptAnalyzer gate that includes this script. No analyzer pass is claimed yet.

Pending and Not yet recorded are evidence states, not failures. Analyzer status does not imply runtime validation.