Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Renamed commands `*-SqlDscBIReportServer` to `*-SqlDscPowerBIReportServer` for
clarity. The old names `*-SqlDscBIReportServer` and `*-SqlDscPBIReportServer`
are available as aliases for backward compatibility
([issue #2071](https://github.com/dsccommunity/SqlServerDsc/issues/2071)).
- `SqlPermission`
- Refactored to use the new object-based server permission commands
(`Grant-SqlDscServerPermission`, `Deny-SqlDscServerPermission`,
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -587,15 +587,15 @@ stages:
'tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1'
'tests/Integration/Commands/Import-SqlDscPreferredModule.Integration.Tests.ps1'
# Group 1
'tests/Integration/Commands/Install-SqlDscBIReportServer.Integration.Tests.ps1'
'tests/Integration/Commands/Install-SqlDscPowerBIReportServer.Integration.Tests.ps1'
# Group 2
'tests/Integration/Commands/Get-SqlDscInstalledInstance.Integration.Tests.ps1'
'tests/Integration/Commands/Get-SqlDscRSSetupConfiguration.Integration.Tests.ps1'
'tests/Integration/Commands/Test-SqlDscRSInstalled.Integration.Tests.ps1'
# Group 8
'tests/Integration/Commands/Repair-SqlDscBIReportServer.Integration.Tests.ps1'
'tests/Integration/Commands/Repair-SqlDscPowerBIReportServer.Integration.Tests.ps1'
# Group 9
'tests/Integration/Commands/Uninstall-SqlDscBIReportServer.Integration.Tests.ps1'
'tests/Integration/Commands/Uninstall-SqlDscPowerBIReportServer.Integration.Tests.ps1'
)
name: test
displayName: 'Run Integration Test'
Expand Down
6 changes: 3 additions & 3 deletions source/Classes/020.SqlRSSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ class SqlRSSetup : ResourceBase
{
Write-Verbose -Message $this.localizedData.Installing_PowerBIReportServer

$exitCode = Install-SqlDscBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop'
$exitCode = Install-SqlDscPowerBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop'

break
}
Expand All @@ -483,7 +483,7 @@ class SqlRSSetup : ResourceBase
{
Write-Verbose -Message $this.localizedData.Repairing_PowerBIReportServer

$exitCode = Repair-SqlDscBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop'
$exitCode = Repair-SqlDscPowerBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop'

break
}
Expand All @@ -492,7 +492,7 @@ class SqlRSSetup : ResourceBase
{
Write-Verbose -Message $this.localizedData.Uninstalling_PowerBIReportServer

$exitCode = Uninstall-SqlDscBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop'
$exitCode = Uninstall-SqlDscPowerBIReportServer @commandParameters -PassThru -Force -ErrorAction 'Stop'

break
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,34 @@
No output is generated when PassThru is not specified.

.EXAMPLE
Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe'
Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe'

Installs Power BI Report Server with default settings.

.EXAMPLE
Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345'
Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345'

Installs Power BI Report Server using a product key.

.EXAMPLE
Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -Edition 'Evaluation' -InstallFolder 'C:\Program Files\Power BI Report Server'
Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -Edition 'Evaluation' -InstallFolder 'C:\Program Files\Power BI Report Server'

Installs Power BI Report Server in evaluation edition to a custom folder.

.EXAMPLE
Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' -EditionUpgrade -LogPath 'C:\Logs\PowerBIReportServer_Install.log'
Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' -EditionUpgrade -LogPath 'C:\Logs\PowerBIReportServer_Install.log'

Installs Power BI Report Server and upgrades the edition using a product key. Also specifies a custom log path.

.EXAMPLE
$exitCode = Install-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -PassThru
$exitCode = Install-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -PassThru

Installs Power BI Report Server with default settings and returns the setup exit code.
#>
function Install-SqlDscBIReportServer
function Install-SqlDscPowerBIReportServer
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'Because ShouldProcess is used in Invoke-SetupAction')]
[Alias('Install-SqlDscBIReportServer', 'Install-SqlDscPBIReportServer')]
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
[OutputType([System.Int32])]
param
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,29 +66,30 @@
code as System.Int32.

.EXAMPLE
Repair-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe'
Repair-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe'

Repairs Power BI Report Server with default settings.

.EXAMPLE
Repair-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' -EditionUpgrade
Repair-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -ProductKey '12345-12345-12345-12345-12345' -EditionUpgrade

Repairs Power BI Report Server and upgrades the edition using a
product key.

.EXAMPLE
Repair-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -LogPath 'C:\Logs\PowerBIReportServer_Repair.log'
Repair-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -LogPath 'C:\Logs\PowerBIReportServer_Repair.log'

Repairs Power BI Report Server and specifies a custom log path.

.EXAMPLE
$exitCode = Repair-SqlDscBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -PassThru
$exitCode = Repair-SqlDscPowerBIReportServer -AcceptLicensingTerms -MediaPath 'E:\PowerBIReportServer.exe' -PassThru

Repairs Power BI Report Server with default settings and returns the setup exit code.
#>
function Repair-SqlDscBIReportServer
function Repair-SqlDscPowerBIReportServer
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'Because ShouldProcess is used in Invoke-SetupAction')]
[Alias('Repair-SqlDscBIReportServer', 'Repair-SqlDscPBIReportServer')]
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
[OutputType([System.Int32])]
param
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,29 @@
No output when PassThru is not specified.

.EXAMPLE
Uninstall-SqlDscBIReportServer -MediaPath 'E:\PowerBIReportServer.exe'
Uninstall-SqlDscPowerBIReportServer -MediaPath 'E:\PowerBIReportServer.exe'

Uninstalls Power BI Report Server.

.EXAMPLE
Uninstall-SqlDscBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -LogPath 'C:\Logs\PowerBIReportServer_Uninstall.log'
Uninstall-SqlDscPowerBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -LogPath 'C:\Logs\PowerBIReportServer_Uninstall.log'

Uninstalls Power BI Report Server and specifies a custom log path.

.EXAMPLE
Uninstall-SqlDscBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -Force
Uninstall-SqlDscPowerBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -Force

Uninstalls Power BI Report Server without prompting for confirmation.

.EXAMPLE
$exitCode = Uninstall-SqlDscBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -PassThru
$exitCode = Uninstall-SqlDscPowerBIReportServer -MediaPath 'E:\PowerBIReportServer.exe' -PassThru

Uninstalls Power BI Report Server and returns the setup exit code.
#>
function Uninstall-SqlDscBIReportServer
function Uninstall-SqlDscPowerBIReportServer
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'Because ShouldProcess is used in Invoke-SetupAction')]
[Alias('Uninstall-SqlDscBIReportServer', 'Uninstall-SqlDscPBIReportServer')]
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
[OutputType([System.Int32])]
param
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ BeforeAll {
Import-Module -Name $script:moduleName -Force -ErrorAction 'Stop'
}

Describe 'Install-SqlDscBIReportServer' -Tag @('Integration_PowerBI') {
Describe 'Install-SqlDscPowerBIReportServer' -Tag @('Integration_PowerBI') {
BeforeAll {
Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose

Expand All @@ -42,7 +42,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag @('Integration_PowerBI') {
Context 'When installing Power BI Report Server' {
# cSpell: ignore PBIRS
It 'Should run the command without throwing' {
# Set splatting parameters for Install-SqlDscBIReportServer
# Set splatting parameters for Install-SqlDscPowerBIReportServer
$installSqlDscBIReportServerParameters = @{
AcceptLicensingTerms = $true
MediaPath = $powerBIReportServerExecutable
Expand All @@ -54,7 +54,7 @@ Describe 'Install-SqlDscBIReportServer' -Tag @('Integration_PowerBI') {
Force = $true
}

$null = Install-SqlDscBIReportServer @installSqlDscBIReportServerParameters -ErrorAction 'Stop'
$null = Install-SqlDscPowerBIReportServer @installSqlDscBIReportServerParameters -ErrorAction 'Stop'
}

It 'Should have installed Power BI Report Server' {
Expand Down
12 changes: 6 additions & 6 deletions tests/Integration/Commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ Command | Run order # | Depends on # | Use instance | Creates persistent objects
Prerequisites | 0 | - | - | Sets up dependencies
Save-SqlDscSqlServerMediaFile | 0 | - | - | Downloads SQL Server media files
Import-SqlDscPreferredModule | 0 | - | - | -
Install-SqlDscBIReportServer | 1 | 0 (Prerequisites) | - | PBIRS instance
Get-SqlDscInstalledInstance | 2 | 1 (Install-SqlDscBIReportServer), 0 (Prerequisites) | PBIRS | -
Get-SqlDscRSSetupConfiguration | 2 | 1 (Install-SqlDscBIReportServer), 0 (Prerequisites) | PBIRS | -
Test-SqlDscRSInstalled | 2 | 1 (Install-SqlDscBIReportServer), 0 (Prerequisites) | PBIRS | -
Repair-SqlDscBIReportServer | 8 | 1 (Install-SqlDscBIReportServer) | PBIRS | -
Uninstall-SqlDscBIReportServer | 9 | 8 (Repair-SqlDscBIReportServer) | - | -
Install-SqlDscPowerBIReportServer | 1 | 0 (Prerequisites) | - | PBIRS instance
Get-SqlDscInstalledInstance | 2 | 1 (Install-SqlDscPowerBIReportServer), 0 (Prerequisites) | PBIRS | -
Get-SqlDscRSSetupConfiguration | 2 | 1 (Install-SqlDscPowerBIReportServer), 0 (Prerequisites) | PBIRS | -
Test-SqlDscRSInstalled | 2 | 1 (Install-SqlDscPowerBIReportServer), 0 (Prerequisites) | PBIRS | -
Repair-SqlDscPowerBIReportServer | 8 | 1 (Install-SqlDscPowerBIReportServer) | PBIRS | -
Uninstall-SqlDscPowerBIReportServer | 9 | 8 (Repair-SqlDscPowerBIReportServer) | - | -
<!-- markdownlint-enable MD013 -->

## Integration Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ BeforeAll {
Import-Module -Name $script:moduleName -Force -ErrorAction 'Stop'
}

Describe 'Repair-SqlDscBIReportServer' -Tag @('Integration_PowerBI') {
Describe 'Repair-SqlDscPowerBIReportServer' -Tag @('Integration_PowerBI') {
BeforeAll {
Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose

Expand All @@ -50,7 +50,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag @('Integration_PowerBI') {

Context 'When repairing BI Report Server' {
It 'Should run the command without throwing' {
# Set splatting parameters for Repair-SqlDscBIReportServer
# Set splatting parameters for Repair-SqlDscPowerBIReportServer
$repairSqlDscBIReportServerParameters = @{
AcceptLicensingTerms = $true
MediaPath = $powerBIReportServerExecutable
Expand All @@ -61,7 +61,7 @@ Describe 'Repair-SqlDscBIReportServer' -Tag @('Integration_PowerBI') {
Force = $true
}

$null = Repair-SqlDscBIReportServer @repairSqlDscBIReportServerParameters
$null = Repair-SqlDscPowerBIReportServer @repairSqlDscBIReportServerParameters
}

It 'Should still have a Power BI Report Server service running after repair' {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ BeforeAll {
Import-Module -Name $script:moduleName -Force -ErrorAction 'Stop'
}

Describe 'Uninstall-SqlDscBIReportServer' -Tag @('Integration_PowerBI') {
Describe 'Uninstall-SqlDscPowerBIReportServer' -Tag @('Integration_PowerBI') {
BeforeAll {
Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose

Expand All @@ -50,7 +50,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag @('Integration_PowerBI') {

Context 'When uninstalling BI Report Server' {
It 'Should run the command without throwing' {
# Set splatting parameters for Uninstall-SqlDscBIReportServer
# Set splatting parameters for Uninstall-SqlDscPowerBIReportServer
$uninstallSqlDscBIReportServerParameters = @{
MediaPath = $powerBIReportServerExecutable
LogPath = Join-Path -Path $script:temporaryFolder -ChildPath 'SSRS_Uninstall.log'
Expand All @@ -60,7 +60,7 @@ Describe 'Uninstall-SqlDscBIReportServer' -Tag @('Integration_PowerBI') {
Force = $true
}

$null = Uninstall-SqlDscBIReportServer @uninstallSqlDscBIReportServerParameters
$null = Uninstall-SqlDscPowerBIReportServer @uninstallSqlDscBIReportServerParameters
}

It 'Should not have a Power BI Report Server service' {
Expand Down
24 changes: 12 additions & 12 deletions tests/Unit/Classes/SqlRSSetup.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
}

Mock -CommandName Install-SqlDscBIReportServer -MockWith {
Mock -CommandName Install-SqlDscPowerBIReportServer -MockWith {
return 0
}
}
Expand All @@ -744,7 +744,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
)

Should -Invoke -CommandName 'Install-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
Should -Invoke -CommandName 'Install-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It
}
}
}
Expand All @@ -759,7 +759,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
}

Mock -CommandName Install-SqlDscBIReportServer -MockWith {
Mock -CommandName Install-SqlDscPowerBIReportServer -MockWith {
return 3010
}

Expand All @@ -777,7 +777,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
)

Should -Invoke -CommandName 'Install-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
Should -Invoke -CommandName 'Install-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It

Should -Invoke -CommandName 'Set-DscMachineRebootRequired' -Exactly -Times 1 -Scope It
}
Expand Down Expand Up @@ -866,7 +866,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
}

Mock -CommandName Uninstall-SqlDscBIReportServer -MockWith {
Mock -CommandName Uninstall-SqlDscPowerBIReportServer -MockWith {
return 0
}
}
Expand All @@ -882,7 +882,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
)

Should -Invoke -CommandName 'Uninstall-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
Should -Invoke -CommandName 'Uninstall-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It
}
}
}
Expand All @@ -897,7 +897,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
}

Mock -CommandName Uninstall-SqlDscBIReportServer -MockWith {
Mock -CommandName Uninstall-SqlDscPowerBIReportServer -MockWith {
return 3010
}

Expand All @@ -915,7 +915,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
)

Should -Invoke -CommandName 'Uninstall-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
Should -Invoke -CommandName 'Uninstall-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It

Should -Invoke -CommandName 'Set-DscMachineRebootRequired' -Exactly -Times 1 -Scope It
}
Expand Down Expand Up @@ -1004,7 +1004,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
}

Mock -CommandName Repair-SqlDscBIReportServer -MockWith {
Mock -CommandName Repair-SqlDscPowerBIReportServer -MockWith {
return 0
}
}
Expand All @@ -1020,7 +1020,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
)

Should -Invoke -CommandName 'Repair-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
Should -Invoke -CommandName 'Repair-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It
}
}
}
Expand All @@ -1035,7 +1035,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
}

Mock -CommandName Repair-SqlDscBIReportServer -MockWith {
Mock -CommandName Repair-SqlDscPowerBIReportServer -MockWith {
return 3010
}

Expand All @@ -1053,7 +1053,7 @@ Describe 'SqlRSSetup\Modify()' -Tag 'Modify' {
}
)

Should -Invoke -CommandName 'Repair-SqlDscBIReportServer' -Exactly -Times 1 -Scope It
Should -Invoke -CommandName 'Repair-SqlDscPowerBIReportServer' -Exactly -Times 1 -Scope It

Should -Invoke -CommandName 'Set-DscMachineRebootRequired' -Exactly -Times 1 -Scope It
}
Expand Down
Loading
Loading