Job step:
Erase Phantom System Health Records.
Job step properties
| Id | Name |
| Name | Erase Phantom System Health Records. |
| ID | 3 |
| Type | PowerShell |
| Run as user | |
| Database | master |
| On success action | 1 (quit with success) |
| Retry attempts | 0 |
| Retry interval(minutes) | 0 |
| On fail action | 2 (quit with failure) |
| Output file |
Command
| if ('$(ESCAPE_SQUOTE(INST))' -eq 'MSSQLSERVER') {$a = '\DEFAULT'} ELSE {$a = ''}; (Get-Item SQLSERVER:\SQLPolicy\$(ESCAPE_NONE(SRVR))$a).EraseSystemHealthPhantomRecords() |
See also