Report Manager administration.. possible through powershell?
Hi All,
This is a very "nooby" question, but I was wondering if there is any other way of performing Report Manager Administration other than through the GUI. Having to click click click every time I want to create a folder or adjust a security role is becoming
quite tedious.
I'm really asking because I'm about to delegate some of this responsibility to an inexperienced user, and if I could perhaps write a powershell script to automate the administrative tasks it would remove a LOT of the possibility for error.
I know this is just a shot in the dark, thanks!
July 14th, 2012 2:25pm
Hi,
I had heard of this project sometimes back, this is still in beta version.
http://ssrsposh.codeplex.com/
If you got ot documentation tab, there are some useful commands which can be helpful to you.
http://ssrsposh.codeplex.com/documentation- Chintak (My Blog)
Free Windows Admin Tool Kit Click here and download it now
July 14th, 2012 2:33pm
There are no PowerShell cmdlets specifically for Report Server administration, but you can use the web service APIs:
http://msdn.microsoft.com/en-us/library/reportservice2010.aspx
If you want to leverage this web service in PowerShell, you can try using the New-WebServiceProxy cmdlet:
http://technet.microsoft.com/library/hh849841.aspx
July 14th, 2012 2:36pm
Hey Guys,
Thanks for the quick response! I think Tristan's web service API's might be the best candidate, as I see right off the bat there are variables for things like Role class. Adjusting security roles is one of the things I find most tedious.
How do I execute one of these API's? I've never used them before. I'm pretty sure I can trailblaze through the initial programming to get something basic going then increase the complexity to accomplish my desired task. I just need to know
how to get started. Any tips?
Thanks!
Free Windows Admin Tool Kit Click here and download it now
July 14th, 2012 2:48pm
Here is some sample script for starters. This gives a user named "SomeUser" Browser permissions on a report named SalesReport which is stored under the ReportsFolder folder:
$rs2010 = New-WebServiceProxy -uri "http://MyServer/ReportServer/ReportService2010.asmx?wsdl" -namespace RS2010 -class RS2010 -UseDefaultCredential
$browserRole = New-Object RS2010.Role
$browserRole.Name = "Browser"
[RS2010.Role[]] $roles = $browserRole
# Get existing policies on report
$inheritParent = $true
[RS2010.Policy[]] $policies = $rs2010.GetPolicies("/ReportsFolder/SalesReport", [ref]$inheritParent)
# Add new policy
$policy = New-Object RS2010.Policy
$policy.GroupUserName = "SomeUser"
$policy.Roles = $roles
$policies += $policy
$rs2010.SetPolicies("/ReportsFolder/SalesReport", $policies)
You can also find some code samples in the MSDN documentation for each API.
July 14th, 2012 4:21pm
Thanks Tristan! This is a great lead.
Free Windows Admin Tool Kit Click here and download it now
July 14th, 2012 4:24pm