<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Eugene Bykov : Shell</title><link>http://blogs.msdn.com/eugenebykov/archive/tags/Shell/default.aspx</link><description>Tags: Shell</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Creating new Report Operator user role</title><link>http://blogs.msdn.com/eugenebykov/archive/2007/10/13/creating-new-report-operator-user-role.aspx</link><pubDate>Sat, 13 Oct 2007 02:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5431459</guid><dc:creator>eugenebykov</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/eugenebykov/comments/5431459.aspx</comments><wfw:commentRss>http://blogs.msdn.com/eugenebykov/commentrss.aspx?PostID=5431459</wfw:commentRss><description>&lt;P&gt;The question keeps popping up so I decided to put this on my blog. SCOM 2007 console does not have an ability to create a new Report Operator user role. Part of the reason is that there is no UI to grant permissions to individual reports from SCOM console either. You can however grant permissions to reports using standard SSRS Report Manager interface as it described in the SCOM documentation (&lt;A href="http://technet.microsoft.com/en-us/library/bb381247.aspx" mce_href="http://technet.microsoft.com/en-us/library/bb381247.aspx"&gt;How to Set Permissions on a Report Using Command Shell in Operations Manager 2007&lt;/A&gt;). The one thing which is left unspecified is how to create a new Report Operator role so you can put users you like to grant or restrict access to into it.&lt;/P&gt;
&lt;P&gt;So here is a script to create a new Report Operator user role using Command Shell:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;$mg = (get-item .).ManagementGroup&lt;BR&gt;$reportOperator = $mg.GetMonitoringProfiles() | where {$_.Name -eq "ReportOperator"}&lt;BR&gt;$obj = new-object Microsoft.EnterpriseManagement.Monitoring.Security.MonitoringUserRole&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;$obj.Name = "TestReportOperatorRole"&lt;BR&gt;$obj.DisplayName = "Test Report Operator Role"&lt;BR&gt;$obj.Description = "Test Report Operator Role"&lt;BR&gt;$obj.MonitoringProfile = $reportOperator&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;$mg.InsertMonitoringUserRole($obj)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;After you execute this script “Test Report Operator Role” appears in UI and you would be able to add users to it using User Role Properties dialog.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5431459" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/eugenebykov/archive/tags/Shell/default.aspx">Shell</category><category domain="http://blogs.msdn.com/eugenebykov/archive/tags/Tips+_2600_amp_3B00_+tricks/default.aspx">Tips &amp;amp; tricks</category></item><item><title>Creating linked reports from favorites.</title><link>http://blogs.msdn.com/eugenebykov/archive/2007/05/24/creating-linked-reports-from-favorites.aspx</link><pubDate>Thu, 24 May 2007 21:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2847448</guid><dc:creator>eugenebykov</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/eugenebykov/comments/2847448.aspx</comments><wfw:commentRss>http://blogs.msdn.com/eugenebykov/commentrss.aspx?PostID=2847448</wfw:commentRss><description>&lt;P&gt;It’s unfortunate but SCOM 2007 RTM does not have an ability to publish favorite reports back to the reporting server. It can however be done manually. The best way to do this is to create a linked report. Console will show the report even if it is not part of the MP. The recommend way obviously would be to put such reports in a separate folder so they wouldn't be accidently removed by the auto-deployment module (read more about reporting catalog organization at my previous post "&lt;A class="" href="http://blogs.msdn.com/eugenebykov/archive/2007/05/14/scom-2007-report-catalog.aspx" mce_href="http://blogs.msdn.com/eugenebykov/archive/2007/05/14/scom-2007-report-catalog.aspx"&gt;SCOM 2007 Report Catalog&lt;/A&gt;").&lt;/P&gt;
&lt;P&gt;Linked reports are shortcuts to reports with different parameters. Favorite reports are pretty much the same thing. The difference is that linked reports are published to reporting server and could be potentially shared among all SCOM users while favorite reports are very personal things created by the user and used by that user only. Favorite reports are not stored on the reporting server. They are stored in the user settings collection in SCOM operational database instead.&lt;/P&gt;
&lt;P&gt;SCOM Command Shell could be used to get a list of favorite reports along with their definitions from the database. Running the following command in the will give you your list of all favorite reports:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;$userSettings = (get-item .).ManagementGroup.GetUserSettings()&lt;BR&gt;$userSettings.GetFavoriteMonitoringReports()&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To get specific report by name use the following command:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;$userSettings = (get-item .).ManagementGroup.GetUserSettings()&lt;BR&gt;$userSettings.GetFavoriteMonitoringReport("&amp;lt;report name&amp;gt;")&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Looking at the result you will find that every report contains bunch of fields. The important ones we are looking for are: Name (the one see in the console), list of parameters (ReportParameters) in XML format and MonitoringReportPath which is full part to the original report in the SSRS. The last two pieces are actually all you need to know to create a linked report. All you need to do now is go to SSRS Report Manager, find a report corresponding to MonitoringReportPath, go it its properties, click "Create Linked Report" and carefully paste parameter values for from the ReportParameters XML to the report Parameter section. Easy huh? Actually not. I know. I hope we can do UI for it soon...&lt;/P&gt;
&lt;P&gt;After you created a linked report don’t forget to copy the corresponding RPDL file to the same location you put linked report at and five it the same name as the linked report has with .rpdl extension. This will ensure you have nice parameter block for your linked report in the console.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2847448" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/eugenebykov/archive/tags/Shell/default.aspx">Shell</category></item></channel></rss>