Skip to content

Commit

Permalink
Merge pull request #7 from AsBuiltReport/dev
Browse files Browse the repository at this point in the history
v0.4.0 public release
  • Loading branch information
rebelinux committed Oct 20, 2022
2 parents 0326835 + 706e2ab commit a8a942e
Show file tree
Hide file tree
Showing 10 changed files with 901 additions and 8 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,19 @@ jobs:
shell: pwsh
run: |
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
tweet:
needs: publish-to-gallery
runs-on: ubuntu-latest
steps:
- uses: Eomm/why-don-t-you-tweet@v1
# We don't want to tweet if the repository is not a public one
if: ${{ !github.event.repository.private }}
with:
# GitHub event payload
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Microsoft #Windows #AsBuiltReport #PowerShell #MVPBuzz"
env:
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
2 changes: 1 addition & 1 deletion AsBuiltReport.Microsoft.Windows.Style.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Paragraph -Style Title $ReportConfig.Report.Name

if ($AsBuiltConfig.Company.FullName) {
# Add Company Name if specified
BlankLine -Count 2
BlankLine -Count 1
Paragraph -Style Title2 $AsBuiltConfig.Company.FullName
BlankLine -Count $LineCount
} else {
Expand Down
3 changes: 2 additions & 1 deletion AsBuiltReport.Microsoft.Windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"Firewall": true
},
"OperatingSystem": {
"Services": true
"Services": true,
"Updates": true
},
"DNS": {
"Aging": true,
Expand Down
4 changes: 2 additions & 2 deletions AsBuiltReport.Microsoft.Windows.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.Microsoft.Windows.psm1'

# Version number of this module.
ModuleVersion = '0.3.0'
ModuleVersion = '0.4.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -54,7 +54,7 @@ PowerShellVersion = '5.1'
RequiredModules = @(
@{
ModuleName = 'AsBuiltReport.Core';
ModuleVersion = '1.1.0'
ModuleVersion = '1.2.0'
}
)

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# :arrows_counterclockwise: Microsoft Windows As Built Report Changelog

## [0.4.0] - 2022-10-20

### Added

- Added table to show the pending/missing Windows updates (Health Check)

## [0.3.0] - 2022-01-29

### Added
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<a href="https://twitter.com/AsBuiltReport" alt="Twitter">
<img src="https://img.shields.io/twitter/follow/AsBuiltReport.svg?style=social"/></a>
</p>
<p align="center">
<a href='https://ko-fi.com/B0B7DDGZ7' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
</p>

# Microsoft Windows As Built Report

Expand All @@ -35,7 +38,9 @@ Please refer to the AsBuiltReport [website](https://www.asbuiltreport.com) for m

## Sample Report - Custom Style 1

Sample Microsoft Windows As Built report HTML file: [Sample Microsoft Windows As-Built Report.html](https://technomyth.zenprsolutions.net/wp-content/uploads/2022/01/Microsoft-Windows-As-Built-Report.html)
Sample Microsoft Windows As Built report HTML file: [Sample Microsoft Windows As-Built Report.html](https://htmlpreview.github.io/?https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport.Microsoft.Windows/dev/Samples/Sample%20Microsoft%20Windows%20As%20Built%20Report.html "Sample Microsoft Windows As-Built Report")

Sample Microsoft Windows As Built report PDF file: [Sample Microsoft Windows As Built Report.pdf](https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport.Microsoft.Windows/dev/Samples/Sample%20Microsoft%20Windows%20As%20Built%20Report.pdf)

# :beginner: Getting Started

Expand All @@ -45,7 +50,7 @@ Below are the instructions on how to install, configure and generate a Microsoft
<!-- ********** Update supported Windows versions ********** -->
The Microsoft Windows As Built Report supports the following Windows Server versions;

- 2012, 2016, 2019
- 2012, 2016, 2019 & 2022

### PowerShell

Expand Down
807 changes: 807 additions & 0 deletions Samples/Sample Microsoft Windows As Built Report.html

Large diffs are not rendered by default.

Binary file not shown.
44 changes: 43 additions & 1 deletion Src/Private/Get-AbrWinOSHotfix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-AbrWinOSHotfix {
.DESCRIPTION
Documents the configuration of Microsoft Windows Server in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.2.0
Version: 0.4.0
Author: Andrew Ramsay
Editor: Jonathan Colon
Twitter: @asbuiltreport
Expand Down Expand Up @@ -60,6 +60,48 @@ function Get-AbrWinOSHotfix {
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
}
try {
$UpdObj = @()
$Updates = Invoke-Command -Session $TempPssSession -ScriptBlock {(New-Object -ComObject Microsoft.Update.Session).CreateupdateSearcher().Search("IsHidden=0 and IsInstalled=0").Updates | Select-Object Title,KBArticleIDs}
$UpdObj += if ($Updates) {
$OutObj = @()
foreach ($Update in $Updates) {
try {
$inObj = [ordered] @{
'KB Article' = "KB$($Update.KBArticleIDs)"
'Name' = $Update.Title
}
$OutObj += [pscustomobject]$inobj

if ($HealthCheck.OperatingSystem.Updates) {
$OutObj | Set-Style -Style Warning
}
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
}
}
$TableParams = @{
Name = "Missing Windows Updates"
List = $false
ColumnWidths = 40, 60
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Sort-Object -Property 'Name' | Table @TableParams
}
if ($UpdObj) {
Section -Style Heading3 'Missing Windows Updates' {
Paragraph "The following section provides a summary of pending/missing windows updates."
BlankLine
$UpdObj
}
}
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
}
}
}
end {}
Expand Down
18 changes: 17 additions & 1 deletion Src/Public/Invoke-AsBuiltReport.Microsoft.Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.Microsoft.Windows {
.DESCRIPTION
Documents the configuration of Microsoft Windows Server in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.3.0
Version: 0.4.0
Author: Andrew Ramsay
Editor: Jonathan Colon
Twitter: @asbuiltreport
Expand All @@ -22,6 +22,22 @@ function Invoke-AsBuiltReport.Microsoft.Windows {
[PSCredential] $Credential
)

Write-PScriboMessage -IsWarning "Please refer to the AsBuiltReport.Microsoft.Windows github website for more detailed information about this project."
Write-PScriboMessage -IsWarning "Do not forget to update your report configuration file after each new release."
Write-PScriboMessage -IsWarning "Documentation: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.Windows"
Write-PScriboMessage -IsWarning "Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.Windows/issues"

$InstalledVersion = Get-Module -ListAvailable -Name AsBuiltReport.Microsoft.Windows -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version

if ($InstalledVersion) {
Write-PScriboMessage -IsWarning "Installed AsBuiltReport.Microsoft.Windows Version: $($InstalledVersion.ToString())"
$MostCurrentVersion = Find-Module -Name AsBuiltReport.Microsoft.Windows -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version
if ($MostCurrentVersion -and ($MostCurrentVersion -gt $InstalledVersion)) {
Write-PScriboMessage -IsWarning "New Update: AsBuiltReport.Microsoft.Windows Version: $($MostCurrentVersion.ToString())"
Write-PScriboMessage -IsWarning "To Update run: Update-Module -Name AsBuiltReport.Microsoft.Windows -Force"
}
}

# Import Report Configuration
$Report = $ReportConfig.Report
$InfoLevel = $ReportConfig.InfoLevel
Expand Down

0 comments on commit a8a942e

Please sign in to comment.