Duplicate hidden Views

Adam_DzyackyAdam_Dzyacky Customer Contributor Monkey ✭✭✭✭✭
edited April 10 in View Builder
I was doing some View clean up the other day, when I came across something interesting. Views I had deleted or updated, existed twice in the same MP despite only seeing one in the Console. Given the DisplayName of the View had not changed, I used the following SMLets to find my duplicate values:

$mgmtServer = "localhost"

Get-SCSMView -name "View.*" -ComputerName $mgmtServer | Sort-Object DisplayName | Group-Object DisplayName | Sort-Object Count
From here, I ended up finding several duplicate Views. Since the results above expose the View Names, I'm able to go right back to:

Get-SCSMView -name "View.GUIDHERE" -computername $mgmtServer

And then compare those differences to find the one true View that is represented in the console and the hidden one that is still stored in the MP. After which, I can simply do the following:

$viewToDelete = Get-SCSMView -name "View.GUIDHERE" -computername $mgmtServer
Remove-SCSMView -View $viewToDelete -computername $mgmtServer

Sharing this because after I deleted these duplicate hidden views that were made through Cireson View Builder, I've had slight Console performance gains. Interested if anyone else experiences not just this issue but the result as well.
Sign In or Register to comment.