In SCSM Analysts have the option to change views for their specific needs. They can change the width of columns, hide columns completely or use grouping and sorting functions. All view personalizations are stored in the SCSM database so that users get their settings everytime they connect to SCSM, no matter from what device or console. From time to time there might be a need to reset these personalizations and set the views back to the original state. This blog post explains how this works.
Let’s start with a simple predefined view. This can be changed by analysts as needed.
Every personalization of an analysts for a specific view is stored in the SCSM database. The personalization is represented in a personalization object. With this script that is based on the smlets PowerShell module you can get the personalization object of a view for a specific user.
$userlogonname = “zehner”
$viewdisplayname = “All Change Requests”
$class_viewpers = get-scsmclass ^system.userpreference.viewpersonalization$
$class_user = get-scsmclass ^system.domain.user$
$viewid = (get-scsmview | where{$_.displayname -eq $viewdisplayname}).Id
$userid = (get-scsmobject -class $class_user -filter “username -eq $userlogonname”).Id
$viewpers = get-scsmobject -class $class_viewpers -filter “viewid = $viewid” | where{$_.userid -eq $userid}
$viewpers
If you have the object you can easily remove it.
get-scsmobject -class $class_viewpers -filter “viewid = $viewid” | where{$_.userid -eq $userid} | remove-scsmobject –force
After running this, the user will again have the original version of the view available. Feel free to optimize the script as needed. Have fun!
Cheers, Marcel
Pingback: MicrosoftTouch