From 5d7af04ce447ca7f6028c686e526a0e36eaf64b9 Mon Sep 17 00:00:00 2001 From: Marko Bozikovic Date: Thu, 19 Oct 2017 15:33:35 +0100 Subject: [PATCH] xSQLServerRSConfig: Adding examples (#852) - Changes to xSQLServerRSConfig - Added examples. --- CHANGELOG.md | 2 ++ .../1-DefaultConfiguration.ps1 | 22 +++++++++++++ .../2-CustomConfiguration.ps1 | 31 +++++++++++++++++++ README.md | 3 +- 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 Examples/Resources/xSQLServerRSConfig/1-DefaultConfiguration.ps1 create mode 100644 Examples/Resources/xSQLServerRSConfig/2-CustomConfiguration.ps1 diff --git a/CHANGELOG.md b/CHANGELOG.md index bb7282dc7..79b9ecbe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ - Added localization (en-US) for all strings in resource and unit tests ([issue #618](https://github.com/PowerShell/xSQLServer/issues/618)). - Updated examples to reflect new parameters. +- Changes to xSQLServerRSConfig + - Added examples ## 8.2.0.0 diff --git a/Examples/Resources/xSQLServerRSConfig/1-DefaultConfiguration.ps1 b/Examples/Resources/xSQLServerRSConfig/1-DefaultConfiguration.ps1 new file mode 100644 index 000000000..b780ed6b8 --- /dev/null +++ b/Examples/Resources/xSQLServerRSConfig/1-DefaultConfiguration.ps1 @@ -0,0 +1,22 @@ +<# +.EXAMPLE + This example performs a default SSRS configuration. It will initialize SSRS + and register default Report Server Web Service and Report Manager URLs: + + http://localhost:80/ReportServer (Report Server Web Service) + + http://localhost:80/Reports (Report Manager) +#> +Configuration Example +{ + Import-DscResource -ModuleName xSqlServer + + node localhost { + xSQLServerRSConfig DefaultConfiguration + { + InstanceName = 'MSSQLSERVER' + RSSQLServer = 'localhost' + RSSQLInstanceName = 'MSSQLSERVER' + } + } +} diff --git a/Examples/Resources/xSQLServerRSConfig/2-CustomConfiguration.ps1 b/Examples/Resources/xSQLServerRSConfig/2-CustomConfiguration.ps1 new file mode 100644 index 000000000..2c616b763 --- /dev/null +++ b/Examples/Resources/xSQLServerRSConfig/2-CustomConfiguration.ps1 @@ -0,0 +1,31 @@ +<# +.EXAMPLE + This example performs a custom SSRS configuration. It will initialize SSRS + and register custom Report Server Web Service and Report Manager URLs: + + http://localhost:80/MyReportServer + https://localhost:443/MyReportServer (Report Server Web Service) + + http://localhost:80/MyReports + https://localhost:443/MyReports (Report Manager) + + Please note: this resource does not currently handle SSL bindings for HTTPS + endpoints. +#> +Configuration Example +{ + Import-DscResource -ModuleName xSqlServer + + node localhost { + xSQLServerRSConfig DefaultConfiguration + { + InstanceName = 'MSSQLSERVER' + RSSQLServer = 'localhost' + RSSQLInstanceName = 'MSSQLSERVER' + ReportServerVirtualDirectory = 'MyReportServer' + ReportsVirtualDirectory = 'MyReports' + ReportServerReservedUrl = @('http://+:80', 'https://+:443') + ReportsReservedUrl = @('http://+:80', 'https://+:443') + } + } +} diff --git a/README.md b/README.md index 71400d943..ced143560 100644 --- a/README.md +++ b/README.md @@ -1140,7 +1140,8 @@ Initializes and configures SQL Reporting Services server. #### Examples -None. +* [Default configuration](Examples/Resources/xSQLServerRSConfig/1-DefaultConfiguration.ps1) +* [Custom virtual directories and reserved URLs](Examples/Resources/xSQLServerRSConfig/2-CustomConfiguration.ps1) ### xSQLServerRSSecureConnectionLevel