Sample Header Ad - 728x90

SSRS bulk permission update 2008R2 to 2014

1 vote
1 answer
788 views
I'm moving SSRS reports from a 2008R2 server to a 2014 server. I've moved all the RDLs with a 3rd party tool only to find none of the permissions exist on the target. I'm attempting to copy the permissions over with Powershell but the script errors when attempting to set the policy with .SetPolicies. The object members appear to be incompatible between 2008 R2 and 2014. Is it possible to move the perms from 2008R2 to 2014 via Powershell? $ReportServerUriSource = 'http://my2008Source/ReportServer/ReportService2010.asmx?wsdl ' $ReportServerUriTarget = 'http://my2014target/ReportServer/ReportService2010.asmx?wsdl ' $InheritParent = $true $rsProxy = New-WebServiceProxy -Uri $ReportServerUriSource - UseDefaultCredential $rsProxyTarget = New-WebServiceProxy -Uri $ReportServerUriTarget - UseDefaultCredential $SourceItems = $rsProxy.ListChildren("/MyReports", $true) | ` SELECT TypeName, Path, ID, Name $targetFolder = $rsProxyTarget.GetPolicies($SourceItem.Path, [ref]$InheritParent) foreach($SourceItem in $SourceItems) { $Policies = $rsProxy.GetPolicies($SourceItem.Path, [ref]$InheritParent) if($InheritParent -eq $false) { $Policy = $rsProxy.GetPolicies($SourceItem.Path, [ref]$InheritParent) $rsProxyTargetPath = $rsProxyTarget.GetPolicies($SourceItem.Path, [ref]$InheritParent) if($rsProxyTargetPath) { $rsProxyTarget.SetPolicies($SourceItem.Path, $Policy) } } } Error: > Cannot convert argument "Policies", with value: "Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1er_ReportService2010_asmx_wsdl.Policy[]", > for "SetPolicies" to type "Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy3er_ReportService2010_asmx_wsdl.Policy[]": "Cannot convert the > "Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1er_ReportService2010_asmx_wsdl.Policy" value of type > "Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1er_ReportService2010_asmx_wsdl.Policy" to type > "Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy3er_ReportService2010_asmx_wsdl.Policy"." > At line:21 char:15 > + $rsProxyTarget.SetPolicies($SourceItem.Path, $Policy) > + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + CategoryInfo : NotSpecified: (:) [], MethodException > + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument
Asked by Matt Sharkey (21 rep)
Oct 25, 2017, 10:49 PM
Last activity: Nov 28, 2017, 05:31 PM