2015-12-14 51 views
2

如何检查Sharepoint 2010上的所有报告订阅?所有订阅列表

我只知道如何检查特定的报告subsciption:

enter image description here

回答

2

不幸的是,有没有办法办法让你从GUI做到这一点。你将不得不打破PowerShell来获取这些信息。

注:我没有测试此代码,还挺从臀部写它,但要点应该能够帮助你:

$spWeb = Get-SPWeb <Site reports are contained in> 
$spRepList = $spWeb.Lists["<List containing reports Name>"]; 
#Get all files 
$spFileList = $spRepList.Files; 

foreach($spFile in $spFileList) 
{ 
    #determine if the file is a report or a regular document 
    if($spFile.URL -like "*.rdl") 
    { 
     $reportServiceProxy = New-WebServiceProxy -URI <url to the reporting web service> -Namespace <Namespace of the service> -UseDefaultCredentials 
     $subscriptionList += $reportServiceProxy.ListSubscriptions($site); 

     #From here you can write to a file or write to the screen. I will let you decide 
     $subscriptionList | select Path, report, Description, Owner, SubscriptionID, lastexecuted,Status | where {$_.path -eq $spFile.URL} 
    } 
} 

希望这有助于。

戴夫

+0

你能给我更多的细节,我必须放在<>? – Kulis

+2

我不太确定我可以给你什么,因为它是你的环境。但是,对于Get-SPWeb,您将需要您的站点的URL,列表是存储报告的位置(例如共享文档)。我无法开始知道您的网络服务地址是什么,您需要从管理员那里获得。 我不确定这是否会有所帮助,但您可以使用此网站获取更多信息:https://msdn.microsoft.com/en-CA/library/dn747196.aspx#bkmk_list_for_1_report 这里的信息可能有帮助。虽然我的脚本建立在它上面。 –