Powershell: Get View display properties from UserRole
Home  » Powershell: Get View display properties from UserRole

Powershell: Get View display properties from UserRole
Posted: Thu, Mar 11, 2010 5:52 AM :: Rank: 1
Author
Points: 1608
Level: System Center Specialist

Currently i'm updating some document (yeehaa) for my SCOM User Roles design.

I can use powershell to enumerate all views used within a role, but can't find a way to get the displayname of those views.

When using:

(Get-UserRole -Id <UserRoleID>).Scope.MonitoringViews

i get a list of GUID's of the views the userrole has access to. How can i use these ID's to retrieve properties like displayname.

Because a view isn't a monitoring class or object, those cmdlets are useless.

Any ideas?

   Report Abuse
Re: Powershell: Get View display properties from UserRole
Posted: Thu, Mar 11, 2010 1:21 PM :: Rank: 0
Author
Points: 160
Level: System Center Hero
I found

http://blogs.msdn.com/rslaten/archive/2008/11/03/exporting-and-importing-user-roles.aspx



and made a few attempts but from what I can tell the only place that the name and guid are linked is withing the XML of teh management pack? Stored in SQL in ManagementPack.MPXML?

   Report Abuse
Re: Powershell: Get View display properties from UserRole
Posted: Fri, Mar 12, 2010 7:17 AM :: Rank: 0
Author
Points: 1608
Level: System Center Specialist

Scott,

Thanks but i allready have the script posted on that blogsite. I use it for backing-up the userroles.

I tried to extend this script to log the view names to a logfile. The group name can be obtained with Get-MonitoringObject.

Because there's no cmdlet for getting views, i'm trying to use the SDK but haven't succeeded so far. I think the name and the GUID's should be linked in the OperationsDB otherwise users would see GUID's instead of localized.

Anyone an idea to use the SDK to retrieve Views with a script?

   Report Abuse

Home  » Powershell: Get View display properties from UserRole
Top Contributors
Featured Members
Pete Zerger
Points: 72684
Level: System Center Expert
Tommy Gunn
Points: 47503
Level: System Center Expert
Simon Skinner
Points: 40804
Level: System Center Expert
Andreas Zuckerhut
Points: 30700
Level: System Center Expert
Stefan Koell
Points: 30179
Level: System Center Expert