Created
February 13, 2017 18:43
-
-
Save SQLvariant/6cc6d15320d2a877a946b83b873be1b2 to your computer and use it in GitHub Desktop.
Code Samples for PowerShell Commands for SQL Server Reporting Services Are Here - Article
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
<#1#> | |
Install-Module -Name ReportingServicesTools | |
Invoke-Expression (Invoke-WebRequest https://aka.ms/rstools) | |
<#2#> | |
Get-Command -Module ReportingServicesTools | |
<#3#> | |
https://github.com/Microsoft/tigertoolbox/raw/master/SQL-performance-dashboard-reports/SQL%20Server%20Performance%20Dashboard%20Reporting%20Solution.zip | |
Get-Help -Full Write-RsFolderContent | |
<#4#> | |
New-RsFolder -ReportServerUri http://localhost/ReportServer -Path / -Name MSSQLTips -Verbose | |
<#5#> | |
Write-RsFolderContent -ReportServerUri http://localhost/ReportServer -Path "C:\MSSQLTips\SQL Server Performance Dashboard\" -Destination /MSSQLTips -Verbose | |
<#6#> | |
Write-RsCatalogItem -ReportServerUri http://localhost/ReportServer -Path "C:\MSSQLTips\SQL Server Performance Dashboard\performance_dashboard_main.rdl" -Destination / -Verbose | |
<#7#> | |
Remove-RsCatalogItem -ReportServerUri http://localhost/ReportServer -Path /performance_dashboard_main -Verbose | |
<#8#> | |
Dir 'C:\MSSQLTips\SQL Server Performance Dashboard\' | | |
Out-GridView -PassThru | | |
Write-RsCatalogItem -ReportServerUri http://localhost/ReportServer -Destination /MSSQLTips -OverWrite -Verbose | |
<#9#> | |
$Reports = 'C:\MSSQLTips\SQL Server Performance Dashboard\historical_io.rdl', 'C:\MSSQLTips\SQL Server Performance Dashboard\historical_waits.rdl' | |
Write-RsCatalogItem -ReportServerUri http://localhost/ReportServer -Path $Reports -Destination / -OverWrite -Verbose | |
<#10#> | |
Dir 'C:\MSSQLTips\SQL Server Performance Dashboard\' -Filter wait*.Rdl | | |
Write-RsCatalogItem -ReportServerUri http://localhost/ReportServer -Destination /MSSQLTips -OverWrite -Verbose | |
<#11#> | |
Dir 'C:\MSSQLTips\SQL Server Performance Dashboard\' -Filter *.Rdl | | |
WHERE LastWriteTime -GT 2017-01-01 | | |
Write-RsCatalogItem -ReportServerUri http://localhost/ReportServer -Destination /MSSQLTips -OverWrite -Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment