Skip to content

Commit a8a942e

Browse files
authored
Merge pull request #7 from AsBuiltReport/dev
v0.4.0 public release
2 parents 0326835 + 706e2ab commit a8a942e

10 files changed

+901
-8
lines changed

.github/workflows/Release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,19 @@ jobs:
2525
shell: pwsh
2626
run: |
2727
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
28+
tweet:
29+
needs: publish-to-gallery
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: Eomm/why-don-t-you-tweet@v1
33+
# We don't want to tweet if the repository is not a public one
34+
if: ${{ !github.event.repository.private }}
35+
with:
36+
# GitHub event payload
37+
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
38+
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"
39+
env:
40+
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
41+
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
42+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
43+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

AsBuiltReport.Microsoft.Windows.Style.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Paragraph -Style Title $ReportConfig.Report.Name
8282

8383
if ($AsBuiltConfig.Company.FullName) {
8484
# Add Company Name if specified
85-
BlankLine -Count 2
85+
BlankLine -Count 1
8686
Paragraph -Style Title2 $AsBuiltConfig.Company.FullName
8787
BlankLine -Count $LineCount
8888
} else {

AsBuiltReport.Microsoft.Windows.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"Firewall": true
3232
},
3333
"OperatingSystem": {
34-
"Services": true
34+
"Services": true,
35+
"Updates": true
3536
},
3637
"DNS": {
3738
"Aging": true,

AsBuiltReport.Microsoft.Windows.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AsBuiltReport.Microsoft.Windows.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.3.0'
15+
ModuleVersion = '0.4.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -54,7 +54,7 @@ PowerShellVersion = '5.1'
5454
RequiredModules = @(
5555
@{
5656
ModuleName = 'AsBuiltReport.Core';
57-
ModuleVersion = '1.1.0'
57+
ModuleVersion = '1.2.0'
5858
}
5959
)
6060

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# :arrows_counterclockwise: Microsoft Windows As Built Report Changelog
22

3+
## [0.4.0] - 2022-10-20
4+
5+
### Added
6+
7+
- Added table to show the pending/missing Windows updates (Health Check)
8+
39
## [0.3.0] - 2022-01-29
410

511
### Added

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<a href="https://twitter.com/AsBuiltReport" alt="Twitter">
2323
<img src="https://img.shields.io/twitter/follow/AsBuiltReport.svg?style=social"/></a>
2424
</p>
25+
<p align="center">
26+
<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>
27+
</p>
2528

2629
# Microsoft Windows As Built Report
2730

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

3639
## Sample Report - Custom Style 1
3740

38-
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)
41+
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")
42+
43+
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)
3944

4045
# :beginner: Getting Started
4146

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

48-
- 2012, 2016, 2019
53+
- 2012, 2016, 2019 & 2022
4954

5055
### PowerShell
5156

Samples/Sample Microsoft Windows As Built Report.html

Lines changed: 807 additions & 0 deletions
Large diffs are not rendered by default.
Binary file not shown.

Src/Private/Get-AbrWinOSHotfix.ps1

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrWinOSHotfix {
55
.DESCRIPTION
66
Documents the configuration of Microsoft Windows Server in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.2.0
8+
Version: 0.4.0
99
Author: Andrew Ramsay
1010
Editor: Jonathan Colon
1111
Twitter: @asbuiltreport
@@ -60,6 +60,48 @@ function Get-AbrWinOSHotfix {
6060
catch {
6161
Write-PscriboMessage -IsWarning $_.Exception.Message
6262
}
63+
try {
64+
$UpdObj = @()
65+
$Updates = Invoke-Command -Session $TempPssSession -ScriptBlock {(New-Object -ComObject Microsoft.Update.Session).CreateupdateSearcher().Search("IsHidden=0 and IsInstalled=0").Updates | Select-Object Title,KBArticleIDs}
66+
$UpdObj += if ($Updates) {
67+
$OutObj = @()
68+
foreach ($Update in $Updates) {
69+
try {
70+
$inObj = [ordered] @{
71+
'KB Article' = "KB$($Update.KBArticleIDs)"
72+
'Name' = $Update.Title
73+
}
74+
$OutObj += [pscustomobject]$inobj
75+
76+
if ($HealthCheck.OperatingSystem.Updates) {
77+
$OutObj | Set-Style -Style Warning
78+
}
79+
}
80+
catch {
81+
Write-PscriboMessage -IsWarning $_.Exception.Message
82+
}
83+
}
84+
$TableParams = @{
85+
Name = "Missing Windows Updates"
86+
List = $false
87+
ColumnWidths = 40, 60
88+
}
89+
if ($Report.ShowTableCaptions) {
90+
$TableParams['Caption'] = "- $($TableParams.Name)"
91+
}
92+
$OutObj | Sort-Object -Property 'Name' | Table @TableParams
93+
}
94+
if ($UpdObj) {
95+
Section -Style Heading3 'Missing Windows Updates' {
96+
Paragraph "The following section provides a summary of pending/missing windows updates."
97+
BlankLine
98+
$UpdObj
99+
}
100+
}
101+
}
102+
catch {
103+
Write-PscriboMessage -IsWarning $_.Exception.Message
104+
}
63105
}
64106
}
65107
end {}

Src/Public/Invoke-AsBuiltReport.Microsoft.Windows.ps1

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.Microsoft.Windows {
55
.DESCRIPTION
66
Documents the configuration of Microsoft Windows Server in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.3.0
8+
Version: 0.4.0
99
Author: Andrew Ramsay
1010
Editor: Jonathan Colon
1111
Twitter: @asbuiltreport
@@ -22,6 +22,22 @@ function Invoke-AsBuiltReport.Microsoft.Windows {
2222
[PSCredential] $Credential
2323
)
2424

25+
Write-PScriboMessage -IsWarning "Please refer to the AsBuiltReport.Microsoft.Windows github website for more detailed information about this project."
26+
Write-PScriboMessage -IsWarning "Do not forget to update your report configuration file after each new release."
27+
Write-PScriboMessage -IsWarning "Documentation: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.Windows"
28+
Write-PScriboMessage -IsWarning "Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.Windows/issues"
29+
30+
$InstalledVersion = Get-Module -ListAvailable -Name AsBuiltReport.Microsoft.Windows -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version
31+
32+
if ($InstalledVersion) {
33+
Write-PScriboMessage -IsWarning "Installed AsBuiltReport.Microsoft.Windows Version: $($InstalledVersion.ToString())"
34+
$MostCurrentVersion = Find-Module -Name AsBuiltReport.Microsoft.Windows -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version
35+
if ($MostCurrentVersion -and ($MostCurrentVersion -gt $InstalledVersion)) {
36+
Write-PScriboMessage -IsWarning "New Update: AsBuiltReport.Microsoft.Windows Version: $($MostCurrentVersion.ToString())"
37+
Write-PScriboMessage -IsWarning "To Update run: Update-Module -Name AsBuiltReport.Microsoft.Windows -Force"
38+
}
39+
}
40+
2541
# Import Report Configuration
2642
$Report = $ReportConfig.Report
2743
$InfoLevel = $ReportConfig.InfoLevel

0 commit comments

Comments
 (0)