-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Repository setup * Update LICENSE * Fix Release GitHub workflow * v0.2.0 release (#1) * Added per section InfoLevel and DC Diagnostic HealthCheck * Added a function to convert bytes automatically to GB or TB based on size * Added a function to convert true or false automatically to Yes or No. Hate Switch cases * Added initial report structure * Convert true or false output to yes or no * Add Active Directory version support, Module Requirements and examples * Fix forwrong false case * Fix string output * Update function name * Add function with new name * Update the functions to filter the content by Domain * Update switch case * Add Organization Unit reporting * Pscribo Message fix * Add site replication health check * Fix created time format * Add site links to the site report function * Add site replication function * Update funtion to better handle DC unavailable situations * Add Site replication to the main report also fix InfoLevel * Section Style Rename * Add code to better handle unavailable DC Server * Add Domain Controller Time Source Function also fix misc issues * Added funtion to check AD Services status (DNS,NTP, NTDS etc) * Add code to beter catch AD Domain issues * Add support to Microsoft Active Directory Group Policy Objects information * Update section heading text * Add support to Microsoft AD Domain Name System Infrastructure information * Add GPO support in Domain Section also added new DNS Section * Add more healthcheck support * update version to 0.2.0 * Add support for DNS Zone information * Ensure support for PSv5.1+ * Update changelog with initial release features * Updated Readme Module Requirements and installation examples * Updated required permissions * Update functions to use pssession * Added more try\catch conditions also improve verbose/debug logging * implement a shared function util file * Added misc documentation * Updated changelog for 0.2.0 changes * Fix FQDN text * Add more Examples * Fix misc text * More fixes * Added Known Issues * Added sample report * The never ending fixes (Readme) * Readme Fixes :( * Readme example fixes * requested recomendation Co-authored-by: Jonathan Colon <[email protected]>
- Loading branch information
Showing
29 changed files
with
3,353 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!--- Provide a general summary of your changes in the Title above --> | ||
|
||
## Description | ||
<!--- Describe your changes in detail --> | ||
|
||
## Related Issue | ||
<!--- This project only accepts pull requests related to open issues --> | ||
<!--- If suggesting a new feature or change, please discuss it in an issue first --> | ||
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> | ||
<!--- Please link to the issue here: --> | ||
|
||
## Motivation and Context | ||
<!--- Why is this change required? What problem does it solve? --> | ||
|
||
## How Has This Been Tested? | ||
<!--- Please describe in detail how you tested your changes. --> | ||
<!--- Include details of your testing environment, and the tests you ran to --> | ||
<!--- see how your change affects other areas of the code, etc. --> | ||
|
||
## Screenshots (if appropriate): | ||
|
||
## Types of changes | ||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to change) | ||
|
||
## Checklist: | ||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> | ||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> | ||
- [ ] My code follows the code style of this project. | ||
- [ ] My change requires a change to the documentation. | ||
- [ ] I have updated the documentation accordingly. | ||
- [ ] I have read the [**CONTRIBUTING**](/CONTRIBUTING.md) document. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: PSScriptAnalyzer | ||
on: [push, pull_request] | ||
jobs: | ||
lint: | ||
name: Run PSScriptAnalyzer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: lint | ||
uses: devblackops/github-action-psscriptanalyzer@master | ||
with: | ||
sendComment: true | ||
failOnErrors: true | ||
failOnWarnings: false | ||
failOnInfos: false | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@{ | ||
ExcludeRules = @( | ||
'PSUseToExportFieldsInManifest', | ||
'PSReviewUnusedParameter', | ||
'PSUseDeclaredVarsMoreThanAssignments', | ||
'PSAvoidGlobalVars' | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Publish PowerShell Module | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-to-gallery: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set PSRepository to Trusted for PowerShell Gallery | ||
shell: pwsh | ||
run: | | ||
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | ||
- name: Install AsBuiltReport.Core module | ||
shell: pwsh | ||
run: | | ||
Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force | ||
- name: Publish module to PowerShell Gallery | ||
shell: pwsh | ||
run: | | ||
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"powershell.codeFormatting.preset": "Custom", | ||
"powershell.codeFormatting.useCorrectCasing": true, | ||
"powershell.codeFormatting.autoCorrectAliases": true, | ||
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true, | ||
"powershell.codeFormatting.whitespaceBeforeOpenParen": true, | ||
"powershell.codeFormatting.whitespaceAroundOperator": true, | ||
"powershell.codeFormatting.whitespaceAfterSeparator": true, | ||
"powershell.codeFormatting.addWhitespaceAroundPipe": true, | ||
"powershell.codeFormatting.ignoreOneLineBlock": true, | ||
"powershell.codeFormatting.newLineAfterCloseBrace": false, | ||
"powershell.codeFormatting.newLineAfterOpenBrace": true, | ||
"powershell.codeFormatting.openBraceOnSameLine": true, | ||
"powershell.codeFormatting.alignPropertyValuePairs": false, | ||
"powershell.codeFolding.enable": true, | ||
"powershell.scriptAnalysis.enable": true, | ||
"powershell.scriptAnalysis.settingsPath": ".github/workflows/PSScriptAnalyzerSettings.psd1", | ||
"editor.tabSize": 4, | ||
"editor.insertSpaces": true, | ||
"editor.detectIndentation": false, | ||
"editor.rulers": [ | ||
115 | ||
], | ||
"files.trimTrailingWhitespace": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Microsoft AD Default Document Style | ||
|
||
# Configure document options | ||
DocumentOption -EnableSectionNumbering -PageSize A4 -DefaultFont 'Arial' -MarginLeftAndRight 71 -MarginTopAndBottom 71 -Orientation $Orientation | ||
|
||
# Configure Heading and Font Styles | ||
Style -Name 'Title' -Size 24 -Color '737373' -Align Center | ||
Style -Name 'Title 2' -Size 18 -Color '00A4EF' -Align Center | ||
Style -Name 'Title 3' -Size 12 -Color '00A4EF' -Align Left | ||
Style -Name 'Heading 1' -Size 16 -Color '00A4EF' | ||
Style -Name 'Heading 2' -Size 14 -Color '00A4EF' | ||
Style -Name 'Heading 3' -Size 12 -Color '00A4EF' | ||
Style -Name 'Heading 4' -Size 11 -Color '00A4EF' | ||
Style -Name 'Heading 5' -Size 10 -Color '00A4EF' | ||
Style -Name 'Normal' -Size 10 -Color '565656' -Default | ||
Style -Name 'Caption' -Size 10 -Color '565656' -Italic -Align Center | ||
Style -Name 'Header' -Size 10 -Color '565656' -Align Center | ||
Style -Name 'Footer' -Size 10 -Color '565656' -Align Center | ||
Style -Name 'TOC' -Size 16 -Color '00A4EF' | ||
Style -Name 'TableDefaultHeading' -Size 10 -Color 'FAFAFA' -BackgroundColor '00A4EF' | ||
Style -Name 'TableDefaultRow' -Size 10 -Color '565656' | ||
Style -Name 'Critical' -Size 10 -BackgroundColor 'F25022' | ||
Style -Name 'Warning' -Size 10 -BackgroundColor 'FFB900' | ||
Style -Name 'Info' -Size 10 -BackgroundColor '00A4EF' | ||
Style -Name 'OK' -Size 10 -BackgroundColor '7FBA00' | ||
|
||
# Configure Table Styles | ||
$TableDefaultProperties = @{ | ||
Id = 'TableDefault' | ||
HeaderStyle = 'TableDefaultHeading' | ||
RowStyle = 'TableDefaultRow' | ||
BorderColor = '00A4EF' | ||
Align = 'Left' | ||
CaptionStyle = 'Caption' | ||
CaptionLocation = 'Below' | ||
BorderWidth = 0.25 | ||
PaddingTop = 1 | ||
PaddingBottom = 1.5 | ||
PaddingLeft = 2 | ||
PaddingRight = 2 | ||
} | ||
|
||
TableStyle @TableDefaultProperties -Default | ||
TableStyle -Id 'Borderless' -HeaderStyle Normal -RowStyle Normal -BorderWidth 0 | ||
|
||
# Microsoft AD Cover Page Layout | ||
# Header & Footer | ||
if ($ReportConfig.Report.ShowHeaderFooter) { | ||
Header -Default { | ||
Paragraph -Style Header "$($ReportConfig.Report.Name) - v$($ReportConfig.Report.Version)" | ||
} | ||
|
||
Footer -Default { | ||
Paragraph -Style Footer 'Page <!# PageNumber #!>' | ||
} | ||
} | ||
|
||
# Set position of report titles and information based on page orientation | ||
if (!($ReportConfig.Report.ShowCoverPageImage)) { | ||
$LineCount = 5 | ||
} | ||
if ($Orientation -eq 'Portrait') { | ||
BlankLine -Count 11 | ||
$LineCount = 32 + $LineCount | ||
} else { | ||
BlankLine -Count 7 | ||
$LineCount = 15 + $LineCount | ||
} | ||
|
||
# Microsoft Logo Image | ||
if ($ReportConfig.Report.ShowCoverPageImage) { | ||
# Always check the vendor's branding guidelines to ensure the use of their company logo is allowed. | ||
# Convert a vendor's logo image to Base64 using https://base64.guru/converter/encode/image/jpg. | ||
# Specify Base64 code using the `Base64` parameter below. Size image accordingly using the `Percent` parameter. Align image to center. | ||
<# | ||
Try { | ||
# Image -Text 'Microsoft Logo' -Align 'Center' -Percent 5 -Base64 "" | ||
} Catch { | ||
Write-PScriboMessage -Message ".NET Core is required for cover page image support. Please install .NET Core or disable 'ShowCoverPageImage' in the report JSON configuration file." | ||
} | ||
#> | ||
} | ||
|
||
# Add Report Name | ||
Paragraph -Style Title $ReportConfig.Report.Name | ||
|
||
if ($AsBuiltConfig.Company.FullName) { | ||
# Add Company Name if specified | ||
BlankLine -Count 2 | ||
Paragraph -Style Title2 $AsBuiltConfig.Company.FullName | ||
BlankLine -Count $LineCount | ||
} else { | ||
BlankLine -Count ($LineCount + 1) | ||
} | ||
Table -Name 'Cover Page' -List -Style Borderless -Width 0 -Hashtable ([Ordered] @{ | ||
'Author:' = $AsBuiltConfig.Report.Author | ||
'Date:' = (Get-Date).ToLongDateString() | ||
'Version:' = $ReportConfig.Report.Version | ||
}) | ||
PageBreak | ||
|
||
if ($ReportConfig.Report.ShowTableOfContents) { | ||
# Add Table of Contents | ||
TOC -Name 'Table of Contents' | ||
PageBreak | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"Report": { | ||
"Name": "Microsoft AD As Built Report", | ||
"Version": "1.0", | ||
"Status": "Released", | ||
"ShowCoverPageImage": true, | ||
"ShowTableOfContents": true, | ||
"ShowHeaderFooter": true, | ||
"ShowTableCaptions": true | ||
}, | ||
"Options": { | ||
|
||
}, | ||
"InfoLevel": { | ||
"_comment_": "0 = Disabled, 1 = Enabled", | ||
"Forest": 1, | ||
"Domain": 1, | ||
"Site": 1, | ||
"DHCP": 1, | ||
"DNS": 1, | ||
"CA": 1 | ||
}, | ||
"HealthCheck": { | ||
"Domain": { | ||
"GMSA": true | ||
}, | ||
"DomainController": { | ||
"Diagnostic": true, | ||
"Services": true | ||
}, | ||
"Site": { | ||
"Replication": true | ||
}, | ||
"DNS": { | ||
"Aging": true | ||
} | ||
} | ||
} |
Oops, something went wrong.