Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Default User committed Nov 1, 2023
1 parent f34b4d4 commit 81a567f
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 24 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ This Project contains the following Blueprints.



### Patch Windows - Security
### Install PSWindowsUpdate Module


### Install PSWindowsUpdate Module
### Patch Windows - Security



Expand Down
18 changes: 10 additions & 8 deletions docs/Patch-Windows---Security.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,11 @@ <h3 id="listmissingsecurityupdates">
<code class="language-sql py-0">
Get-WUHistory -Last 15

# Define a variable to filter for updates
$SecurityUpdates = Get-WindowsUpdate -Category &quot;Security&quot;

# Check if there are missing updates
if ($SecurityUpdates.Count -gt 0) {
Write-Host &quot;Missing Security Updates:&quot;

# List the missing security updates
$SecurityUpdates | ForEach-Object {
Write-Host &quot;KB$($_.KBArticleID): $($_.Title)&quot;
}
Expand Down Expand Up @@ -579,10 +576,11 @@ <h4 id="monitorwindowsupdatetask">
<div class="col px-0">
<pre>
<code class="language-sql py-0">
Get-ScheduledTask -TaskName &quot;PSWindowsUpdate&quot;
do {
$scheduledTask = Get-ScheduledTask -TaskName &quot;PSWindowsUpdate&quot;
Write-Host &quot;PSWindowsUpdate task: $($scheduledTask.State)&quot;
Start-Sleep -Seconds 30
Start-Sleep -Seconds 10
} while ($scheduledTask.State -ne &quot;Ready&quot;)
</code>
</pre>
Expand Down Expand Up @@ -643,7 +641,7 @@ <h4 id="cleanupwindowsupdatetask">
Get-ScheduledTask -TaskName &quot;PSWindowsUpdate&quot;
Unregister-ScheduledTask -TaskName &quot;PSWindowsUpdate&quot; -Confirm:$false
} else {
Write-Host &quot;PSWindowsUPdate isn&#x27;t listed as a Scheduled Task.&quot;
Write-Host &quot;PSWindowsUpdate isn&#x27;t listed as a Scheduled Task.&quot;
}
</code>
</pre>
Expand Down Expand Up @@ -799,6 +797,13 @@ <h3 id="verifythatsecurityupdatesareinstalled">
</h3>
</div>

<div class="row">
<div class="description col px-0">
<p>

</p>
</div>
</div>



Expand Down Expand Up @@ -843,14 +848,11 @@ <h3 id="verifythatsecurityupdatesareinstalled">
<code class="language-sql py-0">
Get-WUHistory -Last 15

# Define a variable to filter for updates
$SecurityUpdates = Get-WindowsUpdate -Category &quot;Security&quot;

# Check if there are missing updates
if ($SecurityUpdates.Count -gt 0) {
Write-Host &quot;Missing Security Updates:&quot;

# List the missing security updates
$SecurityUpdates | ForEach-Object {
Write-Host &quot;KB$($_.KBArticleID): $($_.Title)&quot;
}
Expand Down
12 changes: 6 additions & 6 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ <h6 class="text-right">

<div class="col-12 pt-3 pl-0">
<div class="card"
id="Patch-Windows---Security">
id="Install--PSWindowsUpdate-Module">
<div class="card-body">
<a href="Patch-Windows---Security.html">
<a href="Install--PSWindowsUpdate-Module.html">
<h3 class="card-title">
Patch Windows - Security
Install PSWindowsUpdate Module
</h3>
</a>
</div>
Expand All @@ -190,11 +190,11 @@ <h3 class="card-title">

<div class="col-12 pt-3 pl-0">
<div class="card"
id="Install--PSWindowsUpdate-Module">
id="Patch-Windows---Security">
<div class="card-body">
<a href="Install--PSWindowsUpdate-Module.html">
<a href="Patch-Windows---Security.html">
<h3 class="card-title">
Install PSWindowsUpdate Module
Patch Windows - Security
</h3>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion steps/cleanupwindowsupdatetask/script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ if ($taskExists) {
Get-ScheduledTask -TaskName "PSWindowsUpdate"
Unregister-ScheduledTask -TaskName "PSWindowsUpdate" -Confirm:$false
} else {
Write-Host "PSWindowsUPdate isn't listed as a Scheduled Task."
Write-Host "PSWindowsUpdate isn't listed as a Scheduled Task."
}
3 changes: 0 additions & 3 deletions steps/listmissingsecurityupdates/script.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
Get-WUHistory -Last 15

# Define a variable to filter for updates
$SecurityUpdates = Get-WindowsUpdate -Category "Security"

# Check if there are missing updates
if ($SecurityUpdates.Count -gt 0) {
Write-Host "Missing Security Updates:"

# List the missing security updates
$SecurityUpdates | ForEach-Object {
Write-Host "KB$($_.KBArticleID): $($_.Title)"
}
Expand Down
3 changes: 2 additions & 1 deletion steps/monitorwindowsupdatetask/script.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Get-ScheduledTask -TaskName "PSWindowsUpdate"
do {
$scheduledTask = Get-ScheduledTask -TaskName "PSWindowsUpdate"
Write-Host "PSWindowsUpdate task: $($scheduledTask.State)"
Start-Sleep -Seconds 30
Start-Sleep -Seconds 10
} while ($scheduledTask.State -ne "Ready")
3 changes: 0 additions & 3 deletions steps/verifythatsecurityupdatesareinstalled/script.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
Get-WUHistory -Last 15

# Define a variable to filter for updates
$SecurityUpdates = Get-WindowsUpdate -Category "Security"

# Check if there are missing updates
if ($SecurityUpdates.Count -gt 0) {
Write-Host "Missing Security Updates:"

# List the missing security updates
$SecurityUpdates | ForEach-Object {
Write-Host "KB$($_.KBArticleID): $($_.Title)"
}
Expand Down

0 comments on commit 81a567f

Please sign in to comment.