Skip to content

Commit dfde770

Browse files
authored
Update Clear-SCOMCache.ps1
1 parent 7b66b10 commit dfde770

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Powershell/Clear-SCOMCache.ps1

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
Clear-SCOMCache
44
55
.DESCRIPTION
6-
The script clears the SCOM cache, Flushing DNS, Purging Kerberos Tickets, Resetting NetBIOS over TCPIP Statistics, and Resetting Winsock catalog. And reboots the server(s) if -Reboot switch is present.
6+
The script without any switches clears the SCOM cache first and foremost.
7+
If the -All switch is present: Optionally Flushing DNS, Purging Kerberos Tickets, Resetting NetBIOS over TCPIP Statistics.
8+
If -Reboot switch is present: Reboots the server(s) along with Resetting Winsock catalog.
79
810
.PARAMETER Servers
911
Each Server you want to Clear SCOM Cache on, can be an Agent, Management Server, or SCOM Gateway.
1012
1113
.PARAMETER Reboot
1214
Optionally reboot the server after stopping the SCOM Services and clearing SCOM Cache.
15+
16+
.PARAMETER All
17+
Optionally Flushing DNS, Purging Kerberos Tickets, Resetting NetBIOS over TCPIP Statistics.
1318
1419
.EXAMPLE
1520
Clear all Gray SCOM Agents
@@ -47,7 +52,11 @@ param
4752
[Parameter(Mandatory = $false,
4853
Position = 2,
4954
HelpMessage = 'Optionally reboot the server after stopping the SCOM Services and clearing SCOM Cache. This will always perform on the local server last.')]
50-
[Switch]$Reboot
55+
[Switch]$Reboot,
56+
[Parameter(Mandatory = $false,
57+
Position = 2,
58+
HelpMessage = 'Optionally clear all caches that SCOM could potentially use. Flushing DNS, Purging Kerberos Tickets, Resetting NetBIOS over TCPIP Statistics.')]
59+
[Switch]$All
5160
)
5261
BEGIN
5362
{

0 commit comments

Comments
 (0)