Created
January 9, 2018 16:37
-
-
Save taddison/e9e5f6250d976fc9f1bc917ba5a3d563 to your computer and use it in GitHub Desktop.
Move SSRS owners
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$leaver = "foo\tim.isleaving" | |
$newOwner = "foo\tim.isreplaced" | |
$rs2010 = New-WebServiceProxy -Uri "http://gogoreports/ReportServer/ReportService2010.asmx" -Namespace SSRS.ReportingService2010 -UseDefaultCredential ; | |
$allSubscriptions = $rs2010.ListSubscriptions("/") | |
$subsToMove = ($allSubscriptions | Where-Object { $_.Owner -like $leaver }) | |
$subsToMove | Select-Object Path, Owner, Report | Format-Table | |
$subsToMove | ForEach-Object { $rs2010.ChangeSubscriptionOwner($_.SubscriptionID, $newOwner) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment