PowerShell - Introduction to the Windows As Built Report module

2 min read · Updated 3 February 2023

Did this guide help you? You can support me by subscribing to the channel, sharing it, disabling your ad blocker or making a donation. Thank you!

Hello,

Windows As Built Report is a PowerShell module that works in conjunction with AsBuiltReport.Core on the same principle as Microsoft AD As Built.
AsBuiltReport is an open community project that uses PowerShell to produce documentation in multiple document formats for multiple vendors and technologies.
The module generates a report on a Windows server:
- System information (Drivers, network, updates, roles and functionalities, applications…)
- DNS
- DHCP
- IIS

# Documentation
https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD

# Sample report
https://htmlpreview.github.io/?https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/master/Samples/Sample%20Microsoft%20AD%20As%20Built%20Report.html

# Prerequisites
- Windows PowerShell 5.1 or PowerShell 7
- Module AsBuiltReport.Microsoft.AD 
- PScriboCharts module
- ActiveDirectory module - ADCSAdministration module
- PSPKI Module - GroupPolicy Module - DhcpServer Module - DnsServer Module

#Installing on a server
Install-Module AsBuiltReport.Microsoft.Windows
# DNS/DHCP Server powershell modules
Install-WindowsFeature -Name RSAT-DNS-Server
Install-WindowsFeature -Name RSAT-DHCP
# Hyper-V Server powershell modules
Install-WindowsFeature -Name Hyper-V-PowerShell
# IIS Server powershell modules
Install-WindowsFeature -Name web-mgmt-console
Install-WindowsFeature -Name Web-Scripting-Tools
# The configuration uses a JSON file
# Creation of the default JSON file
$TargetServer = 'srv1.domain.tld'
$Report = 'C:\temp\report'
if (!( test-path $Report )) { new-item 'C:\temp\report' -ItemType Directory }
New-AsBuiltReportConfig -Report Microsoft.Windows -FolderPath 'C:\temp\report'
# Generate a report for a DC with an export in text, HTML and Word with timestamp in the file name
New-AsBuiltReport -Report Microsoft.Windows -Target $TargetServer -Format Text,Html,Word -OutputFolderPath $Report -Timestamp
# Generate a report for a DC with HTML and Word export using a configuration file
New-AsBuiltReport -Report Microsoft.Windows -Target $TargetServer -Format Text,Html,Word -OutputFolderPath $Report -ReportConfigFilePath 'C:\Users\Jon\AsBuiltReport\AsBuiltReport.Microsoft.Windows.json' # Generate a report for a DC with HTML and Word export using the configuration file
# Generate a report for a DC with HTML and Word export, highlighting the problems in the report and using different identifiers
$Creds = Get-Credential
New-AsBuiltReport -Report Microsoft.Windows -Target $TargetServer -Format Text,Html,Word -OutputFolderPath $Report -Credential $Creds -EnableHealthCheck

Related links