Skip to content

Commit eefcef9

Browse files
authored
Major Update!
1 parent dfde770 commit eefcef9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Powershell/Clear-SCOMCache.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
PS C:\> $agent = Get-SCOMClass | where-object{$_.name -eq "microsoft.systemcenter.agent"}
2323
2424
PS C:\> #Get the grey agents
25-
PS C:\> $objects = Get-SCOMMonitoringObject -class:$agent | where {$_.IsAvailable -eq $false} | .\Clear-SCOMCache.ps1 -Servers $objects.DisplayName
26-
PS C:\> .\Clear-SCOMCache.ps1 -Servers $objects.DisplayName
25+
PS C:\> $objects = Get-SCOMMonitoringObject -class:$agent | where {$_.IsAvailable -eq $false}
26+
PS C:\> .\Clear-SCOMCache.ps1 -Servers $objects
2727
2828
Clear SCOM cache on every Management Server in Management Group.
2929
PS C:\> Get-SCOMManagementServer | .\Clear-SCOMCache.ps1
@@ -54,7 +54,7 @@ param
5454
HelpMessage = 'Optionally reboot the server after stopping the SCOM Services and clearing SCOM Cache. This will always perform on the local server last.')]
5555
[Switch]$Reboot,
5656
[Parameter(Mandatory = $false,
57-
Position = 2,
57+
Position = 3,
5858
HelpMessage = 'Optionally clear all caches that SCOM could potentially use. Flushing DNS, Purging Kerberos Tickets, Resetting NetBIOS over TCPIP Statistics.')]
5959
[Switch]$All
6060
)

0 commit comments

Comments
 (0)