Skip to content

Commit 31c073e

Browse files
authored
Merge pull request MicrosoftDocs#3132 from robinharwood/roharwoo_cau_stage_2_examples
Bulk example formatting update
2 parents b23cbc2 + ed057e0 commit 31c073e

18 files changed

+198
-102
lines changed

docset/winserver2022-ps/clusterawareupdating/Add-CauClusterRole.md

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: ClusterAwareUpdating.dll-Help.xml
44
Module Name: ClusterAwareUpdating
5-
ms.date: 12/20/2016
5+
ms.date: 09/27/2022
66
online version: https://learn.microsoft.com/powershell/module/clusterawareupdating/add-cauclusterrole?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Add-CauClusterRole
@@ -58,8 +58,21 @@ Mode (HTTP-In) firewall exception is enabled on each node.
5858

5959
### Example 1: Add a CAU clustered role on the specified cluster at a specific interval
6060

61-
```
62-
PS C:\> Add-CauClusterRole -ClusterName "CONTOSO-FC1" -DaysOfWeek Tuesday,Saturday -WeeksOfMonth 2,4 -MaxFailedNodes 2 -MaxRetriesPerNode 2 -PostUpdateScript \\CONTOSOFileShare\scripts\verifyupdatesinstalled.ps1 -RequireAllNodesOnline -EnableFirewallRules -Force
61+
```powershell
62+
$parameters = @{
63+
ClusterName = 'CONTOSO-FC1'
64+
DaysOfWeek = 'Tuesday',
65+
'Saturday'
66+
WeeksOfMonth = '2',
67+
'4'
68+
MaxFailedNodes = '2'
69+
MaxRetriesPerNode = '2'
70+
PostUpdateScript = '\\CONTOSOFileShare\scripts\verifyupdatesinstalled.ps1'
71+
RequireAllNodesOnline = $true
72+
EnableFirewallRules = $true
73+
Force = $true
74+
}
75+
Add-CauClusterRole @parameters
6376
```
6477

6578
This command adds the CAU clustered role, using a default name, on the cluster called CONTOSO-FC1.
@@ -71,10 +84,23 @@ that cluster must be running. If it is not already enabled, the Remote Shutdown
7184
rule group will be enabled on each cluster node. Because the command uses the *Force* parameter, the
7285
cmdlet runs without displaying confirmation prompts.
7386

87+
This example uses splatting to pass parameter values from the `$parameters` variable to the command.
88+
Learn more about [Splatting](/powershell/module/microsoft.powershell.core/about/about_splatting).
89+
7490
### Example 2: Add a CAU clustered role on the specified cluster at a specific interval
7591

76-
```
77-
PS C:\> Add-CauClusterRole -ClusterName "CONTOSO-FC1" -DaysOfWeek Tuesday,Saturday -IntervalWeeks 3 -MaxFailedNodes 2 -MaxRetriesPerNode 2 -EnableFirewallRules -Force
92+
```powershell
93+
$parameters = @{
94+
ClusterName = 'CONTOSO-FC1'
95+
DaysOfWeek = 'Tuesday',
96+
'Saturday'
97+
IntervalWeeks = '3'
98+
MaxFailedNodes = '2'
99+
MaxRetriesPerNode = '2'
100+
EnableFirewallRules = $true
101+
Force = $true
102+
}
103+
Add-CauClusterRole @parameters
78104
```
79105

80106
This command adds the CAU clustered role, using a default name, on the cluster called CONTOSO-FC1.
@@ -86,10 +112,23 @@ enabled, the Remote Shutdown Windows Firewall rule group will be enabled on each
86112
Because the command uses the *Force* parameter, the cmdlet runs without displaying confirmation
87113
prompts.
88114

115+
This example uses splatting to pass parameter values from the `$parameters` variable to the command.
116+
Learn more about [Splatting](/powershell/module/microsoft.powershell.core/about/about_splatting).
117+
89118
### Example 3: Add a CAU clustered role on the specified cluster using plug-ins
90119

91-
```
92-
PS C:\> Add-CauClusterRole -ClusterName "CONTOSO-FC1" -CauPluginName Microsoft.WindowsUpdatePlugin, Microsoft.HotfixPlugin -CauPluginArguments @{ 'IncludeRecommendedUpdates' = 'True' }, @{ 'HotfixRootFolderPath' = '\\CauHotfixSrv\shareName ' } -StopOnPluginFailure -EnableFirewallRules -Force
120+
```powershell
121+
$parameters = @{
122+
ClusterName = 'CONTOSO-FC1'
123+
CauPluginName = 'Microsoft.WindowsUpdatePlugin',
124+
'Microsoft.HotfixPlugin'
125+
CauPluginArguments = @{'IncludeRecommendedUpdates' = 'True'},
126+
@{'HotfixRootFolderPath' = '\\CauHotfixSrv\shareName'}
127+
StopOnPluginFailure = $true
128+
EnableFirewallRules = $true
129+
Force = $true
130+
}
131+
Add-CauClusterRole @parameters
93132
```
94133

95134
This command adds the CAU clustered role, using a default name, on the cluster called CONTOSO-FC1.
@@ -102,6 +141,9 @@ it is not already enabled, the Remote Shutdown Windows Firewall rule group is en
102141
cluster node. Because the command uses the *Force* parameter, the cmdlet runs without displaying
103142
confirmation prompts.
104143

144+
This example uses splatting to pass parameter values from the `$parameters` variable to the command.
145+
Learn more about [Splatting](/powershell/module/microsoft.powershell.core/about/about_splatting).
146+
105147
## PARAMETERS
106148

107149
### -CauPluginArguments

docset/winserver2022-ps/clusterawareupdating/ClusterAwareUpdating.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Help Version: 5.0.0.1
55
Locale: en-US
66
Module Guid: 4e804861-1dce-46c1-868d-c8f2ab9d220a
77
Module Name: ClusterAwareUpdating
8-
ms.date: 12/20/2016
8+
ms.date: 09/27/2022
99
title: ClusterAwareUpdating
1010
---
1111

docset/winserver2022-ps/clusterawareupdating/Disable-CauClusterRole.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: ClusterAwareUpdating.dll-Help.xml
44
Module Name: ClusterAwareUpdating
5-
ms.date: 12/20/2016
5+
ms.date: 09/27/2022
66
online version: https://learn.microsoft.com/powershell/module/clusterawareupdating/disable-cauclusterrole?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Disable-CauClusterRole
@@ -30,8 +30,8 @@ cluster. The self-updating functionality of the cluster can be re-enabled with t
3030

3131
### Example 1: Disable a CAU clustered role on the specified cluster
3232

33-
```
34-
PS C:\> Disable-CauClusterRole -ClusterName CONTOSO-FC1 -Force
33+
```powershell
34+
Disable-CauClusterRole -ClusterName CONTOSO-FC1 -Force
3535
```
3636

3737
This command prevents the CAU clustered role on the CONTOSO-FC1 cluster from performing Updating

docset/winserver2022-ps/clusterawareupdating/Enable-CauClusterRole.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: ClusterAwareUpdating.dll-Help.xml
44
Module Name: ClusterAwareUpdating
5-
ms.date: 12/20/2016
5+
ms.date: 09/27/2022
66
online version: https://learn.microsoft.com/powershell/module/clusterawareupdating/enable-cauclusterrole?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Enable-CauClusterRole
@@ -30,8 +30,8 @@ cluster. The self-updating functionality of the cluster can be disabled with the
3030

3131
### Example 1: Enable a CAU clustered role on the specified cluster
3232

33-
```
34-
PS C:\> Enable-CauClusterRole -ClusterName "CONTOSO-FC1" -Force
33+
```powershell
34+
Enable-CauClusterRole -ClusterName "CONTOSO-FC1" -Force
3535
```
3636

3737
This command enables the CAU clustered role on the CONTOSO-FC1 cluster to begin performing Updating

docset/winserver2022-ps/clusterawareupdating/Export-CauReport.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: ClusterAwareUpdating.dll-Help.xml
44
Module Name: ClusterAwareUpdating
5-
ms.date: 12/20/2016
5+
ms.date: 09/27/2022
66
online version: https://learn.microsoft.com/powershell/module/clusterawareupdating/export-caureport?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Export-CauReport
@@ -34,13 +34,14 @@ cmdlet. For example, the *Last* parameter specifies the most recent Updating Run
3434

3535
### Example 1: Get a detailed version of the last CAU report for the specified cluster
3636

37-
```
38-
PS C:\> Get-CauReport -ClusterName "Contoso-FC1" -Last -Detailed | Export-CauReport -Format HTML -Path "C:\temp\contoso-fc1_last.html" -TimeZone ([system.timezoneinfo]::Utc)
37+
```powershell
38+
$CauReport = Get-CauReport -ClusterName "Contoso-FC1" -Last -Detailed
39+
$CauReport | Export-CauReport -Format HTML -Path "C:\temp\contoso-fc1_last.html" -TimeZone ([system.timezoneinfo]::Utc)
3940
```
4041

4142
This command gets a detailed version of the last CAU report for the cluster named Contoso-FC1, then
42-
exports that report in HTML format to the path C:\temp\contoso-fc1_last.html. The timestamps in the
43-
report are formatted in the Coordinated Universal Time (UTC) zone.
43+
exports that report in HTML format to the path `C:\temp\contoso-fc1_last.html`. The timestamps in
44+
the report are formatted in the Coordinated Universal Time (UTC) zone.
4445

4546
## PARAMETERS
4647

docset/winserver2022-ps/clusterawareupdating/Get-CauClusterRole.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: ClusterAwareUpdating.dll-Help.xml
44
Module Name: ClusterAwareUpdating
5-
ms.date: 12/20/2016
5+
ms.date: 09/27/2022
66
online version: https://learn.microsoft.com/powershell/module/clusterawareupdating/get-cauclusterrole?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Get-CauClusterRole
@@ -28,20 +28,8 @@ clustered role on the specified cluster.
2828

2929
### Example 1: Get information about a CAU clustered role on the specified cluster
3030

31-
```
32-
PS C:\> Get-CauClusterRole -ClusterName "CONTOSO-FC1"
33-
34-
Name Value
35-
---- -----
36-
ResourceGroupName CAUCAUCldy8
37-
Status Online
38-
StartDate 10/14/2011 3:00:00 AM
39-
MaxFailedNodes 2
40-
MaxRetriesPerNode 2
41-
PostUpdateScript G:\verifyupdatesinstalled.ps1
42-
RequireAllNodesOnline On
43-
DaysOfWeek Tuesday, Saturday
44-
WeeksOfMonth {2, 4}
31+
```powershell
32+
Get-CauClusterRole -ClusterName "CONTOSO-FC1"
4533
```
4634

4735
This command gets information about the CAU clustered role on the cluster named CONTOSO-FC1.

docset/winserver2022-ps/clusterawareupdating/Get-CauPlugin.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: ClusterAwareUpdating.dll-Help.xml
44
Module Name: ClusterAwareUpdating
5-
ms.date: 12/20/2016
5+
ms.date: 09/27/2022
66
online version: https://learn.microsoft.com/powershell/module/clusterawareupdating/get-cauplugin?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Get-CauPlugin
@@ -36,15 +36,8 @@ in CAU, see [How CAU Plug-ins Work](https://go.microsoft.com/fwlink/p/?LinkId=23
3636

3737
### Example 1: Get information about software update plug-ins
3838

39-
```
40-
PS C:\> Get-CauPlugin | Format-List -Property "*"
41-
42-
Name : Microsoft.WindowsUpdatePlugin
43-
BinaryPath : C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ClusterAwareUpdating\ClusterAwareUpdating.dll
44-
ClassName : MS.Internal.ClusterAwareUpdating.WuaPlugin
45-
Name : Microsoft.HotfixPlugin
46-
BinaryPath : C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ClusterAwareUpdating\ClusterAwareUpdating.dll
47-
ClassName : MS.Internal.ClusterAwareUpdating.HotfixPlugin
39+
```powershell
40+
Get-CauPlugin | Format-List -Property "*"
4841
```
4942

5043
This command gets information about the software updating plug-ins that are registered in the local

docset/winserver2022-ps/clusterawareupdating/Get-CauReport.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: ClusterAwareUpdating.dll-Help.xml
44
Module Name: ClusterAwareUpdating
5-
ms.date: 12/20/2016
5+
ms.date: 09/27/2022
66
online version: https://learn.microsoft.com/powershell/module/clusterawareupdating/get-caureport?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Get-CauReport
@@ -56,31 +56,31 @@ Run report. By default, the report contains summaries only, but more detail can
5656

5757
### Example 1: Get a detailed list of updating runs from the specified cluster
5858

59-
```
60-
PS C:\> Get-CauReport -ClusterName Contoso-FC1 -StartDate 01/01/2012 -Detailed
59+
```powershell
60+
Get-CauReport -ClusterName Contoso-FC1 -StartDate 01/01/2012 -Detailed
6161
```
6262

6363
This command gets a detailed list of the updating runs performed on the cluster named Contoso-FC1 on
6464
01/01/2012 or later.
6565

6666
### Example 2: Get a detailed list of updating runs from a date span from the specified cluster
6767

68-
```
69-
PS C:\> Get-CauReport -ClusterName "Contoso-FC1" -StartDate 01/01/2012 -EndDate 04/01/2012 -Detailed
68+
```powershell
69+
Get-CauReport -ClusterName "Contoso-FC1" -StartDate 01/01/2012 -EndDate 04/01/2012 -Detailed
7070
```
7171

7272
This command gets a detailed list of the updating runs performed on the cluster called Contoso-FC1
7373
starting with updating runs on 01/01/2012 and ending with updating runs on 04/01/2012.
7474

7575
### Example 3: Get the last updating run summary from the specified cluster
7676

77-
```
78-
PS C:\> $CauReportSummary = Get-CauReport "Contoso-FC1" -Last
79-
PS C:\> Get-CauReport "Contoso-FC1" -Report $CauReportSummary
77+
```powershell
78+
$CauReportSummary = Get-CauReport "Contoso-FC1" -Last
79+
Get-CauReport "Contoso-FC1" -Report $CauReportSummary
8080
```
8181

8282
The first command gets the last updating run report summary from the cluster named Contoso-FC1 and
83-
stores the result in the variable named $CauReportSummary.
83+
stores the result in the variable named `$CauReportSummary`.
8484

8585
The second command gets the detailed report from the information stored in the $CauReportSummary
8686
variable.

docset/winserver2022-ps/clusterawareupdating/Get-CauRun.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: ClusterAwareUpdating.dll-Help.xml
44
Module Name: ClusterAwareUpdating
5-
ms.date: 12/20/2016
5+
ms.date: 09/27/2022
66
online version: https://learn.microsoft.com/powershell/module/clusterawareupdating/get-caurun?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Get-CauRun
@@ -51,9 +51,11 @@ Use this cmdlet to monitor current updating runs.
5151

5252
### Example 1: Get status information about the updating run in progress from the specified cluster
5353

54+
```powershell
55+
Get-CauRun -ClusterName "CONTOSO-FC1"
5456
```
55-
PS C:\> Get-CauRun -ClusterName "CONTOSO-FC1"
5657

58+
```output
5759
RunId : 834dd11e-584b-41f2-8d22-4c9c0471dbad
5860
RunStartTime : 10/13/2011 1:35:39 PM
5961
CurrentOrchestrator : NODE1

docset/winserver2022-ps/clusterawareupdating/Invoke-CauRun.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
33
external help file: ClusterAwareUpdating.dll-Help.xml
44
Module Name: ClusterAwareUpdating
5-
ms.date: 12/20/2016
5+
ms.date: 09/27/2022
66
online version: https://learn.microsoft.com/powershell/module/clusterawareupdating/invoke-caurun?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Invoke-CauRun
@@ -58,8 +58,16 @@ exception is enabled on each node.
5858

5959
### Example 1: Preform a scan and a full updating run on the specified cluster
6060

61-
```
62-
PS C:\> Invoke-CauRun -ClusterName "CONTOSO-FC1" -CauPluginName "Microsoft.WindowsUpdatePlugin" -MaxFailedNodes 1 -MaxRetriesPerNode 3 -RequireAllNodesOnline -Force
61+
```powershell
62+
$parameters = @{
63+
ClusterName = 'CONTOSO-FC1'
64+
CauPluginName = 'Microsoft.WindowsUpdatePlugin'
65+
MaxFailedNodes = '1'
66+
MaxRetriesPerNode = '3'
67+
RequireAllNodesOnline = $true
68+
Force = $true
69+
}
70+
Invoke-CauRun @parameters
6371
```
6472

6573
This command performs a scan and a full updating run on the cluster named CONTOSO-FC1. This cmdlet
@@ -69,10 +77,24 @@ before marking the node as failed, and allows no more than one node to fail befo
6977
entire updating run as failed. Because the command specifies the *Force* parameter, the cmdlet runs
7078
without displaying confirmation prompts.
7179

80+
This example uses splatting to pass parameter values from the `$parameters` variable to the command.
81+
Learn more about [Splatting](/powershell/module/microsoft.powershell.core/about/about_splatting).
82+
7283
### Example 2: Preform a scan and a full updating run on the specified cluster using multiple plug-ins
7384

74-
```
75-
PS C:\> Invoke-CauRun -ClusterName CONTOSO-FC1 -CauPluginName Microsoft.WindowsUpdatePlugin, Microsoft.HotfixPlugin -CauPluginArguments @{ }, @{ 'HotfixRootFolderPath' = '\\CauHotfixSrv\shareName' } -EnableFirewallRules -StopOnPluginFailure -SeparateReboots -Force
85+
```powershell
86+
$parameters = @{
87+
ClusterName = 'CONTOSO-FC1'
88+
CauPluginName = 'Microsoft.WindowsUpdatePlugin',
89+
'Microsoft.HotfixPlugin'
90+
CauPluginArguments = @{ },
91+
@{'HotfixRootFolderPath' = '\\CauHotfixSrv\shareName'}
92+
StopOnPluginFailure = $true
93+
EnableFirewallRules = $true
94+
SeparateReboots = $true
95+
Force = $true
96+
}
97+
Invoke-CauRun @parameters
7698
```
7799

78100
This command performs a scan and a full updating run on the cluster named CONTOSO-FC1. This cmdlet
@@ -86,10 +108,13 @@ applied by **Microsoft.HotfixPlugin plug-in**. If the installation of updates by
86108
**Microsoft.HotfixPlugin plug-in** installs updates. Because the command specifies the *Force*
87109
parameter, the cmdlet runs without displaying confirmation prompts.
88110

111+
This example uses splatting to pass parameter values from the `$parameters` variable to the command.
112+
Learn more about [Splatting](/powershell/module/microsoft.powershell.core/about/about_splatting).
113+
89114
### Example 3: Recover from a previous updating run that failed on the specified cluster
90115

91-
```
92-
PS C:\> Invoke-CauRun -ClusterName "CONTOSO-FC1"-ForceRecovery -Force
116+
```powershell
117+
Invoke-CauRun -ClusterName "CONTOSO-FC1"-ForceRecovery -Force
93118
```
94119

95120
This command recovers from a previous updating run that failed and left the cluster in a Locked

0 commit comments

Comments
 (0)