diff --git a/DeployCube/DeployCube.psd1 b/DeployCube/DeployCube.psd1 index b3073fc..6dd3c92 100644 --- a/DeployCube/DeployCube.psd1 +++ b/DeployCube/DeployCube.psd1 @@ -3,7 +3,7 @@ # # Generated by: Dr. John Tunnicliffe # -# Generated on: 08/04/2019 +# Generated on: 04/01/2021 # @{ @@ -12,7 +12,7 @@ RootModule = 'DeployCube.psm1' # Version number of this module. -ModuleVersion = '1.0.0' +ModuleVersion = '1.2.0' # ID used to uniquely identify this module GUID = 'de85c41f-a8ab-41b3-90ec-2cb7d1bc1cb3' @@ -24,10 +24,10 @@ Author = 'Dr. John Tunnicliffe' CompanyName = 'Decision Analytics' # Copyright statement for this module -Copyright = '(c) 2019 Dr. John Tunnicliffe. All rights reserved.' +Copyright = '(c) 2019-2021 Dr. John Tunnicliffe. All rights reserved.' # Description of the functionality provided by this module -Description = 'Deploy your SQL Server Analysis Services Cube (Tabular or ' +Description = 'Provides utilities to help you deploy your Analysis Services cube to Azure or your on-premise servers. Supports both Tabular and Multidimensional projects. Full documentation can be found on the [project site](https://github.com/DrJohnT/DeployCube)' # Minimum version of the Windows PowerShell engine required by this module PowerShellVersion = '5.0' diff --git a/DeployCube/en-US/DeployCube-help.xml b/DeployCube/en-US/DeployCube-help.xml index 098514c..473366a 100644 --- a/DeployCube/en-US/DeployCube-help.xml +++ b/DeployCube/en-US/DeployCube-help.xml @@ -10,7 +10,7 @@ - Finds and lists the location path to every version of Microsoft.AnalysisServices.Deployment.exe on the machine + Finds and lists the location path to every version of Microsoft.AnalysisServices.Deployment.exe on the machine. Also checks the custom install location defined by Environment variable CustomAsDwInstallLocation @@ -40,7 +40,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -69,7 +69,9 @@ - Finds the path to specific version of Microsoft.AnalysisServices.Deployment.exe + Finds the path to specific version of Microsoft.AnalysisServices.Deployment.exe Checks the following locations: + ${env:ProgramFiles(x86)}\Microsoft SQL Server*\Tools\Binn ${env:ProgramFiles(x86)}\Microsoft SQL Server Management Studio *\Common7\IDE $env:CustomAsDwInstallLocation + The environment variable $env:CustomAsDwInstallLocation allows you to specify your own custom install directory. @@ -77,11 +79,14 @@ Version - The version of Microsoft.AnalysisServices.Deployment.exe to find. Valid values for -Version are: ('15', '14', '13', '12', '11') which translate as follows: * 15: SQL Server 2019 + The version of Microsoft.AnalysisServices.Deployment.exe to find. Valid values for -Version are: ('15', '14', '13', '12', '11') which translate as follows: + * 15: SQL Server 2019 * 14: SQL Server 2017 * 13: SQL Server 2016 * 12: SQL Server 2014 * 11: SQL Server 2012 + + If you are unsure which version(s) of Microsoft.AnalysisServices.Deployment.exe you have installed, use the function Find-AnalysisServicesDeploymentExeLocations to obtain a full list. String @@ -96,11 +101,14 @@ Version - The version of Microsoft.AnalysisServices.Deployment.exe to find. Valid values for -Version are: ('15', '14', '13', '12', '11') which translate as follows: * 15: SQL Server 2019 + The version of Microsoft.AnalysisServices.Deployment.exe to find. Valid values for -Version are: ('15', '14', '13', '12', '11') which translate as follows: + * 15: SQL Server 2019 * 14: SQL Server 2017 * 13: SQL Server 2016 * 12: SQL Server 2014 * 11: SQL Server 2012 + + If you are unsure which version(s) of Microsoft.AnalysisServices.Deployment.exe you have installed, use the function Find-AnalysisServicesDeploymentExeLocations to obtain a full list. String @@ -123,15 +131,22 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT -------------------------- EXAMPLE 1 -------------------------- - Get-AnalysisServicesDeploymentExePath -Version latest + Get-AnalysisServicesDeploymentExePath -Version 15 - Returns the latest version of Microsoft.AnalysisServices.Deployment.exe + Returns the SQL Server 2019 version of Microsoft.AnalysisServices.Deployment.exe (if present on the machine). + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-AnalysisServicesDeploymentExePath -Version 14 + + Returns the SQL Server 2017 version of Microsoft.AnalysisServices.Deployment.exe (if present on the machine). @@ -181,6 +196,18 @@ None + + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + @@ -208,6 +235,18 @@ None + + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + @@ -222,7 +261,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -288,7 +327,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -363,7 +402,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -462,7 +501,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -532,6 +571,30 @@ None + + SqlUserID + + $SqlUserID + + String + + String + + + None + + + SqlUserPwd + + {{ Fill SqlUserPwd Description }} + + String + + String + + + None + @@ -571,6 +634,30 @@ None + + SqlUserID + + $SqlUserID + + String + + String + + + None + + + SqlUserPwd + + {{ Fill SqlUserPwd Description }} + + String + + String + + + None + @@ -585,7 +672,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -660,7 +747,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -774,7 +861,7 @@ - + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -833,6 +920,18 @@ None + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + + RefreshType Valid options are: 'Full', 'Automatic', 'ClearValues', 'Calculate'. Default value: 'Full'. 'Full': processes all the objects in the cube database. When Full processing is executed against an object that has already been processed, Analysis Services drops all data in the object and then processes the object. 'Automatic': detects the process state of cube database objects, and performs the processing necessary to deliver unprocessed or partially processed objects to a fully processed state. 'ClearValues': Clear values in this object and all its dependents. 'Calculate': Recalculate this object and all its dependents, but only if needed. This value does not force recalculation, except for volatile formulas. @@ -872,6 +971,18 @@ None + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + + RefreshType Valid options are: 'Full', 'Automatic', 'ClearValues', 'Calculate'. Default value: 'Full'. 'Full': processes all the objects in the cube database. When Full processing is executed against an object that has already been processed, Analysis Services drops all data in the object and then processes the object. 'Automatic': detects the process state of cube database objects, and performs the processing necessary to deliver unprocessed or partially processed objects to a fully processed state. 'ClearValues': Clear values in this object and all its dependents. 'Calculate': Recalculate this object and all its dependents, but only if needed. This value does not force recalculation, except for volatile formulas. @@ -888,15 +999,22 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT - -------------------------- Example 1 -------------------------- - PS C:\> {{ Add example code here }} + -------------------------- EXAMPLE 1 -------------------------- + Invoke-ProcessTabularCubeDatabase -Server "localhost" -CubeDatabase "MyCube" -RefreshType "Full" + + + + + + -------------------------- EXAMPLE 2 -------------------------- + Invoke-ProcessTabularCubeDatabase -Server "localhost" -CubeDatabase "MyCube2" -Credential "MyPsCredential" -RefreshType "Automatic" - {{ Add example description here }} + @@ -946,6 +1064,18 @@ None + + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + @@ -973,6 +1103,18 @@ None + + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + @@ -987,7 +1129,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -1012,11 +1154,11 @@ Ping SsasServer - Checks that the SQL Server SSAS instance exists. + For on-premise SSAS instances only! Checks that the SQL Server SSAS instance exists. - Checks that the SQL Server SSAS instance exists. + For on-premise SSAS instances only! Checks that the SQL Server SSAS instance exists. @@ -1062,7 +1204,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -1134,6 +1276,30 @@ UseExisting + + UserID + + [Optional] The user name used to connect to the AAS server. + + String + + String + + + None + + + Password + + [Optional] The password of the above user (in plain text unfortunately). + + String + + String + + + None + Server @@ -1403,12 +1569,36 @@ UseExisting + + UserID + + [Optional] The user name used to connect to the AAS server. + + String + + String + + + None + + + Password + + [Optional] The password of the above user (in plain text unfortunately). + + String + + String + + + None + - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -1445,12 +1635,15 @@ PreferredVersion - The preferred version of Microsoft.AnalysisServices.Deployment.exe to attempt to find. Valid values for -PreferredVersion are: ('15', '14', '13', '12', '11', 'latest') which translate as follows: * latest: Latest SQL Server version found on agent + The preferred version of Microsoft.AnalysisServices.Deployment.exe to attempt to find. Valid values for -PreferredVersion are: ('15', '14', '13', '12', '11', 'latest') which translate as follows: + * latest: Latest SQL Server version found on agent * 15: SQL Server 2019 * 14: SQL Server 2017 * 13: SQL Server 2016 * 12: SQL Server 2014 * 11: SQL Server 2012 + + If you are unsure which version(s) of Microsoft.AnalysisServices.Deployment.exe you have installed, use the function \ Find-AnalysisServicesDeploymentExeLocations\ (https://github.com/DrJohnT/DeployCube/blob/master/docs/Find-AnalysisServicesDeploymentExeLocations.md)to obtain a full list. String @@ -1465,12 +1658,15 @@ PreferredVersion - The preferred version of Microsoft.AnalysisServices.Deployment.exe to attempt to find. Valid values for -PreferredVersion are: ('15', '14', '13', '12', '11', 'latest') which translate as follows: * latest: Latest SQL Server version found on agent + The preferred version of Microsoft.AnalysisServices.Deployment.exe to attempt to find. Valid values for -PreferredVersion are: ('15', '14', '13', '12', '11', 'latest') which translate as follows: + * latest: Latest SQL Server version found on agent * 15: SQL Server 2019 * 14: SQL Server 2017 * 13: SQL Server 2016 * 12: SQL Server 2014 * 11: SQL Server 2012 + + If you are unsure which version(s) of Microsoft.AnalysisServices.Deployment.exe you have installed, use the function \ Find-AnalysisServicesDeploymentExeLocations\ (https://github.com/DrJohnT/DeployCube/blob/master/docs/Find-AnalysisServicesDeploymentExeLocations.md)to obtain a full list. String @@ -1493,15 +1689,22 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT -------------------------- EXAMPLE 1 -------------------------- - Select-AnalysisServicesDeploymentExeVersion -PreferredVersion 140; + Select-AnalysisServicesDeploymentExeVersion -PreferredVersion latest; - + Returns the latest version of Microsoft.AnalysisServices.Deployment.exe found on the machine. + + + + -------------------------- EXAMPLE 2 -------------------------- + Select-AnalysisServicesDeploymentExeVersion -PreferredVersion 14; + + Returns the SQL Server 2017 version of Microsoft.AnalysisServices.Deployment.exe (if present on the machine). @@ -1551,6 +1754,18 @@ None + + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + @@ -1578,12 +1793,24 @@ None + + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -1647,6 +1874,30 @@ UseExisting + + UserID + + {{ Fill UserID Description }} + + String + + String + + + None + + + Password + + {{ Fill Password Description }} + + String + + String + + + None + Server @@ -1895,12 +2146,36 @@ UseExisting + + UserID + + {{ Fill UserID Description }} + + String + + String + + + None + + + Password + + {{ Fill Password Description }} + + String + + String + + + None + - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT @@ -1953,6 +2228,18 @@ None + + ImpersonationPwd + + The password of the account that will be used to connect to the SQL Server database. Required for ImpersonationMode='ImpersonateAccount'. + + String + + String + + + None + CubeDatabase @@ -1965,7 +2252,19 @@ None - + + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + + SourceSqlServer The name of the source SQL Server server or its IP address. Include the instance name and port if necessary. @@ -1977,7 +2276,7 @@ None - + SourceSqlDatabase The name of the database which will act as a source of data for the tabular cube database. @@ -1989,10 +2288,10 @@ None - - ImpersonationMode + + SqlUserID - Defines how the cube will connect to the data source. Possible options are 'ImpersonateServiceAccount' which connects to the SQL Server database using , or 'ImpersonateAccount' which uses a specific username/password. When using 'ImpersonateAccount' it is best to use a domain based service account with a static password. + {{ Fill SqlUserID Description }} String @@ -2001,10 +2300,10 @@ None - - ImpersonationAccount + + SqlUserPwd - The username of the account that will be used to connect to the SQL Server database. Required for ImpersonationMode='ImpersonateAccount'. + {{ Fill SqlUserPwd Description }} String @@ -2013,10 +2312,22 @@ None - - ImpersonationPassword + + ImpersonationMode - The password of the account that will be used to connect to the SQL Server database. Required for ImpersonationMode='ImpersonateAccount'. + Defines how the cube will connect to the data source. Possible options are 'ImpersonateServiceAccount' which connects to the SQL Server database using , or 'ImpersonateAccount' which uses a specific username/password. When using 'ImpersonateAccount' it is best to use a domain based service account with a static password. + + String + + String + + + None + + + ImpersonationAccount + + The username of the account that will be used to connect to the SQL Server database. Required for ImpersonationMode='ImpersonateAccount'. String @@ -2052,7 +2363,19 @@ None - + + Credential + + [Optional] A PSCredential object containing the credentials to connect to the AAS server. + + PSCredential + + PSCredential + + + None + + SourceSqlServer The name of the source SQL Server server or its IP address. Include the instance name and port if necessary. @@ -2064,7 +2387,7 @@ None - + SourceSqlDatabase The name of the database which will act as a source of data for the tabular cube database. @@ -2076,7 +2399,31 @@ None - + + SqlUserID + + {{ Fill SqlUserID Description }} + + String + + String + + + None + + + SqlUserPwd + + {{ Fill SqlUserPwd Description }} + + String + + String + + + None + + ImpersonationMode Defines how the cube will connect to the data source. Possible options are 'ImpersonateServiceAccount' which connects to the SQL Server database using , or 'ImpersonateAccount' which uses a specific username/password. When using 'ImpersonateAccount' it is best to use a domain based service account with a static password. @@ -2088,7 +2435,7 @@ None - + ImpersonationAccount The username of the account that will be used to connect to the SQL Server database. Required for ImpersonationMode='ImpersonateAccount'. @@ -2100,8 +2447,8 @@ None - - ImpersonationPassword + + ImpersonationPwd The password of the account that will be used to connect to the SQL Server database. Required for ImpersonationMode='ImpersonateAccount'. @@ -2126,7 +2473,7 @@ - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT diff --git a/DeployCube/public/Find-AnalysisServicesDeploymentExeLocations.ps1 b/DeployCube/public/Find-AnalysisServicesDeploymentExeLocations.ps1 index eb027f4..a9da202 100644 --- a/DeployCube/public/Find-AnalysisServicesDeploymentExeLocations.ps1 +++ b/DeployCube/public/Find-AnalysisServicesDeploymentExeLocations.ps1 @@ -4,7 +4,8 @@ function Find-AnalysisServicesDeploymentExeLocations { Lists all locations of Microsoft.AnalysisServices.Deployment.exe files on the machine .DESCRIPTION - Finds and lists the location path to every version of Microsoft.AnalysisServices.Deployment.exe on the machine + Finds and lists the location path to every version of Microsoft.AnalysisServices.Deployment.exe on the machine. + Also checks the custom install location defined by Environment variable CustomAsDwInstallLocation .EXAMPLE Find-AnalysisServicesDeploymentExeLocations @@ -19,7 +20,7 @@ function Find-AnalysisServicesDeploymentExeLocations { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> @@ -34,6 +35,9 @@ function Find-AnalysisServicesDeploymentExeLocations { #V18 (SSMS - 150) $AnalysisServicesDeploymentExes += Get-Childitem -Path "${env:ProgramFiles(x86)}\Microsoft SQL Server Management Studio *\Common7" -Recurse -Include $ExeName -ErrorAction SilentlyContinue; + # Custom install location defined by Environment variable CustomAsDwInstallLocation + $AnalysisServicesDeploymentExes += Get-Childitem -Path "${env:CustomAsDwInstallLocation}" -Recurse -Include $ExeName -ErrorAction SilentlyContinue; + # list all the locations found foreach ($AnalysisServicesDeploymentExe in $AnalysisServicesDeploymentExes) { [string]$ProductVersion = $AnalysisServicesDeploymentExe.VersionInfo.ProductVersion.Substring(0,2); diff --git a/DeployCube/public/Get-AnalysisServicesDeploymentExePath.ps1 b/DeployCube/public/Get-AnalysisServicesDeploymentExePath.ps1 index 3c50641..df61645 100644 --- a/DeployCube/public/Get-AnalysisServicesDeploymentExePath.ps1 +++ b/DeployCube/public/Get-AnalysisServicesDeploymentExePath.ps1 @@ -5,20 +5,35 @@ function Get-AnalysisServicesDeploymentExePath { .DESCRIPTION Finds the path to specific version of Microsoft.AnalysisServices.Deployment.exe + Checks the following locations: + + ${env:ProgramFiles(x86)}\Microsoft SQL Server\*\Tools\Binn + ${env:ProgramFiles(x86)}\Microsoft SQL Server Management Studio *\Common7\IDE + $env:CustomAsDwInstallLocation + + The environment variable $env:CustomAsDwInstallLocation allows you to specify your own custom install directory. .PARAMETER Version The version of Microsoft.AnalysisServices.Deployment.exe to find. Valid values for -Version are: ('15', '14', '13', '12', '11') which translate as follows: + * 15: SQL Server 2019 * 14: SQL Server 2017 * 13: SQL Server 2016 * 12: SQL Server 2014 * 11: SQL Server 2012 + + If you are unsure which version(s) of Microsoft.AnalysisServices.Deployment.exe you have installed, use the function **Find-AnalysisServicesDeploymentExeLocations** to obtain a full list. .EXAMPLE - Get-AnalysisServicesDeploymentExePath -Version latest + Get-AnalysisServicesDeploymentExePath -Version 15 - Returns the latest version of Microsoft.AnalysisServices.Deployment.exe + Returns the SQL Server 2019 version of Microsoft.AnalysisServices.Deployment.exe (if present on the machine). + + .EXAMPLE + Get-AnalysisServicesDeploymentExePath -Version 14 + + Returns the SQL Server 2017 version of Microsoft.AnalysisServices.Deployment.exe (if present on the machine). .OUTPUTS Returns a string containing the full path to the selected version of Microsoft.AnalysisServices.Deployment.exe @@ -27,7 +42,7 @@ function Get-AnalysisServicesDeploymentExePath { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [OutputType([string])] @@ -51,6 +66,9 @@ function Get-AnalysisServicesDeploymentExePath { # Location SQL Server 2019 and greater (i.e. installed with SSMS) $AnalysisServicesDeploymentExes += Get-Childitem -Path "${env:ProgramFiles(x86)}\Microsoft SQL Server Management Studio *\Common7\IDE" -Recurse -Include $ExeName -ErrorAction SilentlyContinue; + # Custom install location defined by Environment variable CustomAsDwInstallLocation + $AnalysisServicesDeploymentExes += Get-Childitem -Path "${env:CustomAsDwInstallLocation}" -Recurse -Include $ExeName -ErrorAction SilentlyContinue; + foreach ($AnalysisServicesDeploymentExe in $AnalysisServicesDeploymentExes) { $ExePath = $AnalysisServicesDeploymentExe.FullName; [string] $ProductVersion = $AnalysisServicesDeploymentExe.VersionInfo.ProductVersion; diff --git a/DeployCube/public/Get-CubeDatabaseCompatibilityLevel.ps1 b/DeployCube/public/Get-CubeDatabaseCompatibilityLevel.ps1 index 190d22f..076371e 100644 --- a/DeployCube/public/Get-CubeDatabaseCompatibilityLevel.ps1 +++ b/DeployCube/public/Get-CubeDatabaseCompatibilityLevel.ps1 @@ -24,7 +24,7 @@ function Get-CubeDatabaseCompatibilityLevel { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [OutputType([int])] diff --git a/DeployCube/public/Get-ModuleByName.ps1 b/DeployCube/public/Get-ModuleByName.ps1 index 8783dd2..3f5635a 100644 --- a/DeployCube/public/Get-ModuleByName.ps1 +++ b/DeployCube/public/Get-ModuleByName.ps1 @@ -18,7 +18,7 @@ function Get-ModuleByName { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [CmdletBinding()] diff --git a/DeployCube/public/Get-ServerMode.ps1 b/DeployCube/public/Get-ServerMode.ps1 index cbb6d34..fa79e2b 100644 --- a/DeployCube/public/Get-ServerMode.ps1 +++ b/DeployCube/public/Get-ServerMode.ps1 @@ -18,7 +18,7 @@ function Get-ServerMode { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [OutputType([String])] diff --git a/DeployCube/public/Get-SqlAsPath.ps1 b/DeployCube/public/Get-SqlAsPath.ps1 index 055a64f..e22298b 100644 --- a/DeployCube/public/Get-SqlAsPath.ps1 +++ b/DeployCube/public/Get-SqlAsPath.ps1 @@ -30,7 +30,7 @@ function Get-SqlAsPath { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [OutputType([String])] diff --git a/DeployCube/public/Get-SqlConnectionString.ps1 b/DeployCube/public/Get-SqlConnectionString.ps1 index 1491717..8e7e40e 100644 --- a/DeployCube/public/Get-SqlConnectionString.ps1 +++ b/DeployCube/public/Get-SqlConnectionString.ps1 @@ -30,7 +30,7 @@ function Get-SqlConnectionString { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [OutputType([string])] diff --git a/DeployCube/public/Get-SsasProcessingMessages.ps1 b/DeployCube/public/Get-SsasProcessingMessages.ps1 index db335af..dc169ed 100644 --- a/DeployCube/public/Get-SsasProcessingMessages.ps1 +++ b/DeployCube/public/Get-SsasProcessingMessages.ps1 @@ -20,9 +20,9 @@ function Get-SsasProcessingMessages { .LINK https://github.com/DrJohnT/DeployCube -.NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube - This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT + .NOTES + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube + This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [CmdletBinding()] param diff --git a/DeployCube/public/Invoke-ExternalCommand.ps1 b/DeployCube/public/Invoke-ExternalCommand.ps1 index 21b27e5..fa958fc 100644 --- a/DeployCube/public/Invoke-ExternalCommand.ps1 +++ b/DeployCube/public/Invoke-ExternalCommand.ps1 @@ -24,6 +24,9 @@ function Invoke-ExternalCommand { .LINK https://github.com/DrJohnT/DeployCube + .NOTES + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube + This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [CmdletBinding()] param( diff --git a/DeployCube/public/Invoke-ProcessTabularCubeDatabase.ps1 b/DeployCube/public/Invoke-ProcessTabularCubeDatabase.ps1 index 2dba027..ecd6fee 100644 --- a/DeployCube/public/Invoke-ProcessTabularCubeDatabase.ps1 +++ b/DeployCube/public/Invoke-ProcessTabularCubeDatabase.ps1 @@ -23,11 +23,17 @@ function Invoke-ProcessTabularCubeDatabase { 'ClearValues': Clear values in this object and all its dependents. 'Calculate': Recalculate this object and all its dependents, but only if needed. This value does not force recalculation, except for volatile formulas. + .EXAMPLE + Invoke-ProcessTabularCubeDatabase -Server "localhost" -CubeDatabase "MyCube" -RefreshType "Full" + + .EXAMPLE + Invoke-ProcessTabularCubeDatabase -Server "localhost" -CubeDatabase "MyCube2" -Credential "MyPsCredential" -RefreshType "Automatic" + .LINK https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [CmdletBinding()] diff --git a/DeployCube/public/Ping-SsasDatabase.ps1 b/DeployCube/public/Ping-SsasDatabase.ps1 index 682b526..bbc6a7a 100644 --- a/DeployCube/public/Ping-SsasDatabase.ps1 +++ b/DeployCube/public/Ping-SsasDatabase.ps1 @@ -24,7 +24,7 @@ function Ping-SsasDatabase { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [OutputType([Boolean])] diff --git a/DeployCube/public/Ping-SsasServer.ps1 b/DeployCube/public/Ping-SsasServer.ps1 index f7fc1c6..5309993 100644 --- a/DeployCube/public/Ping-SsasServer.ps1 +++ b/DeployCube/public/Ping-SsasServer.ps1 @@ -20,7 +20,7 @@ function Ping-SsasServer { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [OutputType([Boolean])] diff --git a/DeployCube/public/Publish-Cube.ps1 b/DeployCube/public/Publish-Cube.ps1 index 27745e7..322f068 100644 --- a/DeployCube/public/Publish-Cube.ps1 +++ b/DeployCube/public/Publish-Cube.ps1 @@ -81,7 +81,7 @@ function Publish-Cube { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [CmdletBinding()] diff --git a/DeployCube/public/Select-AnalysisServicesDeploymentExeVersion.ps1 b/DeployCube/public/Select-AnalysisServicesDeploymentExeVersion.ps1 index bee2a3b..3129a3e 100644 --- a/DeployCube/public/Select-AnalysisServicesDeploymentExeVersion.ps1 +++ b/DeployCube/public/Select-AnalysisServicesDeploymentExeVersion.ps1 @@ -9,6 +9,7 @@ function Select-AnalysisServicesDeploymentExeVersion { .PARAMETER PreferredVersion The preferred version of Microsoft.AnalysisServices.Deployment.exe to attempt to find. Valid values for -PreferredVersion are: ('15', '14', '13', '12', '11', 'latest') which translate as follows: + * latest: Latest SQL Server version found on agent * 15: SQL Server 2019 * 14: SQL Server 2017 @@ -16,8 +17,17 @@ function Select-AnalysisServicesDeploymentExeVersion { * 12: SQL Server 2014 * 11: SQL Server 2012 + If you are unsure which version(s) of Microsoft.AnalysisServices.Deployment.exe you have installed, use the function [Find-AnalysisServicesDeploymentExeLocations](https://github.com/DrJohnT/DeployCube/blob/master/docs/Find-AnalysisServicesDeploymentExeLocations.md) to obtain a full list. + .EXAMPLE - Select-AnalysisServicesDeploymentExeVersion -PreferredVersion 140; + Select-AnalysisServicesDeploymentExeVersion -PreferredVersion latest; + + Returns the latest version of Microsoft.AnalysisServices.Deployment.exe found on the machine. + + .EXAMPLE + Select-AnalysisServicesDeploymentExeVersion -PreferredVersion 14; + + Returns the SQL Server 2017 version of Microsoft.AnalysisServices.Deployment.exe (if present on the machine). .OUTPUTS Returns a string containing the version found, if the preferred version could not be found. @@ -26,7 +36,7 @@ function Select-AnalysisServicesDeploymentExeVersion { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [OutputType([string])] diff --git a/DeployCube/public/Unpublish-Cube.ps1 b/DeployCube/public/Unpublish-Cube.ps1 index 866836d..4fc26a5 100644 --- a/DeployCube/public/Unpublish-Cube.ps1 +++ b/DeployCube/public/Unpublish-Cube.ps1 @@ -22,7 +22,7 @@ function Unpublish-Cube { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [CmdletBinding()] diff --git a/DeployCube/public/Update-AnalysisServicesConfig.ps1 b/DeployCube/public/Update-AnalysisServicesConfig.ps1 index 5343025..e5b4e89 100644 --- a/DeployCube/public/Update-AnalysisServicesConfig.ps1 +++ b/DeployCube/public/Update-AnalysisServicesConfig.ps1 @@ -74,7 +74,7 @@ function Update-AnalysisServicesConfig { https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [CmdletBinding()] diff --git a/DeployCube/public/Update-TabularCubeDataSource.ps1 b/DeployCube/public/Update-TabularCubeDataSource.ps1 index 1e3555e..15b4276 100644 --- a/DeployCube/public/Update-TabularCubeDataSource.ps1 +++ b/DeployCube/public/Update-TabularCubeDataSource.ps1 @@ -43,7 +43,7 @@ function Update-TabularCubeDataSource https://github.com/DrJohnT/DeployCube .NOTES - Written by (c) Dr. John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube + Written by (c) Dr. John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT #> [OutputType([Boolean])] diff --git a/README.md b/README.md index fa04068..bafdd9f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ [![PowerShell Gallery Version](https://img.shields.io/powershellgallery/v/DeployCube.svg)](https://www.powershellgallery.com/packages/DeployCube) -[![Build Status](https://qatar-re.visualstudio.com/QatarRe.BI/_apis/build/status/Test%20and%20Publish%20Package%20DeployCube?branchName=master)](https://qatar-re.visualstudio.com/QatarRe.BI/_build/latest?definitionId=58&branchName=master) - +[![Build status](https://dev.azure.com/drjohnt/DeployCube/_apis/build/status/DeployCube-CI)](https://dev.azure.com/drjohnt/DeployCube/_build/latest?definitionId=5) ### DeployCube @@ -8,7 +7,7 @@ ## Overview -**Publish-Cube** allows you to deploy a tabular or multidimensional cube to a SQL Server Analysis Services instance. Behind the scenes it uses the +**Publish-Cube** allows you to deploy a tabular or multidimensional cube to an Analysis Services instance either on-premise or in Azure. Behind the scenes it uses the [Analysis Services Deployment Utility](https://docs.microsoft.com/en-us/sql/analysis-services/multidimensional-models/deploy-model-solutions-with-the-deployment-utility) in silent mode. **Publish-Cube** simplifies the use of [Analysis Services Deployment Utility](https://docs.microsoft.com/en-us/sql/analysis-services/multidimensional-models/deploy-model-solutions-with-the-deployment-utility) @@ -42,9 +41,11 @@ Microsoft.AnalysisServices.Deployment.exe is known as the [Analysis Services Dep The module also requires the Microsoft SQL Server PowerShell module **SqlServer** which is installed automatically. +Custom install directories for Microsoft.AnalysisServices.Deployment.exe are now supported. Please set the environment variable CustomAsDwInstallLocation prior to running any functions. + ### Admin privileges required for deployment -In order to successfully deploy a tabular cube, the process running **Publish-Cube** needs to run under a service account that has admin privileges on your target SQL Server Analysis Services instance. +In order to successfully deploy a tabular cube, the process running **Publish-Cube** needs to run under a service account that has admin privileges on your target Azure Analysis Services or SSAS instance. If you wish to use a specific Windows account, all of the relevant functions have UserID / Password parameters. ## Getting Started diff --git a/docs/Find-AnalysisServicesDeploymentExeLocations.md b/docs/Find-AnalysisServicesDeploymentExeLocations.md index 92611d6..8c0eed9 100644 --- a/docs/Find-AnalysisServicesDeploymentExeLocations.md +++ b/docs/Find-AnalysisServicesDeploymentExeLocations.md @@ -17,7 +17,8 @@ Find-AnalysisServicesDeploymentExeLocations ``` ## DESCRIPTION -Finds and lists the location path to every version of Microsoft.AnalysisServices.Deployment.exe on the machine +Finds and lists the location path to every version of Microsoft.AnalysisServices.Deployment.exe on the machine. +Also checks the custom install location defined by Environment variable CustomAsDwInstallLocation ## EXAMPLES @@ -36,7 +37,7 @@ Find-AnalysisServicesDeploymentExeLocations ### Output is written to standard output. ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Get-AnalysisServicesDeploymentExePath.md b/docs/Get-AnalysisServicesDeploymentExePath.md index 6cf32a5..1e7ab68 100644 --- a/docs/Get-AnalysisServicesDeploymentExePath.md +++ b/docs/Get-AnalysisServicesDeploymentExePath.md @@ -18,27 +18,44 @@ Get-AnalysisServicesDeploymentExePath [-Version] [] ## DESCRIPTION Finds the path to specific version of Microsoft.AnalysisServices.Deployment.exe +Checks the following locations: + + ${env:ProgramFiles(x86)}\Microsoft SQL Server\*\Tools\Binn + ${env:ProgramFiles(x86)}\Microsoft SQL Server Management Studio *\Common7\IDE + $env:CustomAsDwInstallLocation + +The environment variable $env:CustomAsDwInstallLocation allows you to specify your own custom install directory. ## EXAMPLES ### EXAMPLE 1 ``` -Get-AnalysisServicesDeploymentExePath -Version latest +Get-AnalysisServicesDeploymentExePath -Version 15 +``` + +Returns the SQL Server 2019 version of Microsoft.AnalysisServices.Deployment.exe (if present on the machine). + +### EXAMPLE 2 +``` +Get-AnalysisServicesDeploymentExePath -Version 14 ``` -Returns the latest version of Microsoft.AnalysisServices.Deployment.exe +Returns the SQL Server 2017 version of Microsoft.AnalysisServices.Deployment.exe (if present on the machine). ## PARAMETERS ### -Version The version of Microsoft.AnalysisServices.Deployment.exe to find. Valid values for -Version are: ('15', '14', '13', '12', '11') which translate as follows: + * 15: SQL Server 2019 * 14: SQL Server 2017 * 13: SQL Server 2016 * 12: SQL Server 2014 * 11: SQL Server 2012 +If you are unsure which version(s) of Microsoft.AnalysisServices.Deployment.exe you have installed, use the function **Find-AnalysisServicesDeploymentExeLocations** to obtain a full list. + ```yaml Type: String Parameter Sets: (All) @@ -61,7 +78,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### Returns a string containing the full path to the selected version of Microsoft.AnalysisServices.Deployment.exe ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Get-CubeDatabaseCompatibilityLevel.md b/docs/Get-CubeDatabaseCompatibilityLevel.md index 1bac796..336ee8d 100644 --- a/docs/Get-CubeDatabaseCompatibilityLevel.md +++ b/docs/Get-CubeDatabaseCompatibilityLevel.md @@ -13,7 +13,8 @@ Gets the compatibility level of a deployed cube. ## SYNTAX ``` -Get-CubeDatabaseCompatibilityLevel [-Server] [-CubeDatabase] [] +Get-CubeDatabaseCompatibilityLevel [-Server] [-CubeDatabase] [[-Credential] ] + [] ``` ## DESCRIPTION @@ -60,6 +61,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Credential +\[Optional\] A PSCredential object containing the credentials to connect to the AAS server. + +```yaml +Type: PSCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -70,7 +86,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.Int32 ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Get-ModuleByName.md b/docs/Get-ModuleByName.md index 267b8c3..d3c73ad 100644 --- a/docs/Get-ModuleByName.md +++ b/docs/Get-ModuleByName.md @@ -54,7 +54,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Get-ServerMode.md b/docs/Get-ServerMode.md index 44603fb..ac08f32 100644 --- a/docs/Get-ServerMode.md +++ b/docs/Get-ServerMode.md @@ -55,7 +55,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Get-SqlAsPath.md b/docs/Get-SqlAsPath.md index f5d4900..2b483f2 100644 --- a/docs/Get-SqlAsPath.md +++ b/docs/Get-SqlAsPath.md @@ -79,7 +79,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Get-SqlConnectionString.md b/docs/Get-SqlConnectionString.md index a6180d0..2c02973 100644 --- a/docs/Get-SqlConnectionString.md +++ b/docs/Get-SqlConnectionString.md @@ -14,7 +14,7 @@ Updates a connection strings to source SQL databases with new server and databas ``` Get-SqlConnectionString [-SourceSqlServer] [-SourceSqlDatabase] - [-ExistingConnectionString] [] + [-ExistingConnectionString] [[-SqlUserID] ] [[-SqlUserPwd] ] [] ``` ## DESCRIPTION @@ -77,6 +77,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -SqlUserID +$SqlUserID + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SqlUserPwd +{{ Fill SqlUserPwd Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -87,7 +117,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.String ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Get-SsasProcessingMessages.md b/docs/Get-SsasProcessingMessages.md index 06396f2..09af491 100644 --- a/docs/Get-SsasProcessingMessages.md +++ b/docs/Get-SsasProcessingMessages.md @@ -57,7 +57,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### No return parameters. Writes to error stream only if an error is detected. ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Invoke-ExternalCommand.md b/docs/Invoke-ExternalCommand.md index d9195f9..ad07204 100644 --- a/docs/Invoke-ExternalCommand.md +++ b/docs/Invoke-ExternalCommand.md @@ -87,6 +87,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ## NOTES +Written by (c) Dr. +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube +This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Invoke-ProcessTabularCubeDatabase.md b/docs/Invoke-ProcessTabularCubeDatabase.md index 1bb71a6..e4b2c48 100644 --- a/docs/Invoke-ProcessTabularCubeDatabase.md +++ b/docs/Invoke-ProcessTabularCubeDatabase.md @@ -13,8 +13,8 @@ Processes an SSAS database on a SQL Server SSAS instance ## SYNTAX ``` -Invoke-ProcessTabularCubeDatabase [-Server] [-CubeDatabase] [[-RefreshType] ] - [] +Invoke-ProcessTabularCubeDatabase [-Server] [-CubeDatabase] [[-Credential] ] + [[-RefreshType] ] [] ``` ## DESCRIPTION @@ -22,12 +22,15 @@ Processes an SSAS database on a SQL Server SSAS instance ## EXAMPLES -### Example 1 -```powershell -PS C:\> {{ Add example code here }} +### EXAMPLE 1 +``` +Invoke-ProcessTabularCubeDatabase -Server "localhost" -CubeDatabase "MyCube" -RefreshType "Full" ``` -{{ Add example description here }} +### EXAMPLE 2 +``` +Invoke-ProcessTabularCubeDatabase -Server "localhost" -CubeDatabase "MyCube2" -Credential "MyPsCredential" -RefreshType "Automatic" +``` ## PARAMETERS @@ -61,6 +64,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Credential +\[Optional\] A PSCredential object containing the credentials to connect to the AAS server. + +```yaml +Type: PSCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RefreshType Valid options are: 'Full', 'Automatic', 'ClearValues', 'Calculate'. Default value: 'Full'. @@ -77,7 +95,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 4 Default value: Full Accept pipeline input: False Accept wildcard characters: False @@ -92,7 +110,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Ping-SsasDatabase.md b/docs/Ping-SsasDatabase.md index 5f0e715..536e42c 100644 --- a/docs/Ping-SsasDatabase.md +++ b/docs/Ping-SsasDatabase.md @@ -13,7 +13,8 @@ Checks that the database exists on the specified SQL Server SSAS instance ## SYNTAX ``` -Ping-SsasDatabase [-Server] [-CubeDatabase] [] +Ping-SsasDatabase [-Server] [-CubeDatabase] [[-Credential] ] + [] ``` ## DESCRIPTION @@ -60,6 +61,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Credential +\[Optional\] A PSCredential object containing the credentials to connect to the AAS server. + +```yaml +Type: PSCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -70,7 +86,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.Boolean ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Ping-SsasServer.md b/docs/Ping-SsasServer.md index 974614c..3f409af 100644 --- a/docs/Ping-SsasServer.md +++ b/docs/Ping-SsasServer.md @@ -8,6 +8,7 @@ schema: 2.0.0 # Ping-SsasServer ## SYNOPSIS +For on-premise SSAS instances only! Checks that the SQL Server SSAS instance exists. ## SYNTAX @@ -17,6 +18,7 @@ Ping-SsasServer [-Server] [] ``` ## DESCRIPTION +For on-premise SSAS instances only! Checks that the SQL Server SSAS instance exists. ## EXAMPLES @@ -55,7 +57,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### System.Boolean ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Publish-Cube.md b/docs/Publish-Cube.md index 5508c11..f40b08e 100644 --- a/docs/Publish-Cube.md +++ b/docs/Publish-Cube.md @@ -16,7 +16,8 @@ Publish-Cube deploys a tabular or multidimentional cube to a SQL Server Analysis Publish-Cube [-AsDatabasePath] [-Server] [-CubeDatabase] [[-PreferredVersion] ] [[-ProcessingOption] ] [[-TransactionalDeployment] ] [[-PartitionDeployment] ] [[-RoleDeployment] ] [[-ConfigurationSettingsDeployment] ] - [[-OptimizationSettingsDeployment] ] [[-WriteBackTableCreation] ] [] + [[-OptimizationSettingsDeployment] ] [[-WriteBackTableCreation] ] [[-UserID] ] + [[-Password] ] [] ``` ## DESCRIPTION @@ -230,6 +231,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -UserID +\[Optional\] The user name used to connect to the AAS server. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 12 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Password +\[Optional\] The password of the above user (in plain text unfortunately). + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 13 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -239,7 +270,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Select-AnalysisServicesDeploymentExeVersion.md b/docs/Select-AnalysisServicesDeploymentExeVersion.md index 7c0aae2..772b674 100644 --- a/docs/Select-AnalysisServicesDeploymentExeVersion.md +++ b/docs/Select-AnalysisServicesDeploymentExeVersion.md @@ -23,14 +23,24 @@ Selects a version of Microsoft.AnalysisServices.Deployment.exe to use ### EXAMPLE 1 ``` -Select-AnalysisServicesDeploymentExeVersion -PreferredVersion 140; +Select-AnalysisServicesDeploymentExeVersion -PreferredVersion latest; ``` +Returns the latest version of Microsoft.AnalysisServices.Deployment.exe found on the machine. + +### EXAMPLE 2 +``` +Select-AnalysisServicesDeploymentExeVersion -PreferredVersion 14; +``` + +Returns the SQL Server 2017 version of Microsoft.AnalysisServices.Deployment.exe (if present on the machine). + ## PARAMETERS ### -PreferredVersion The preferred version of Microsoft.AnalysisServices.Deployment.exe to attempt to find. Valid values for -PreferredVersion are: ('15', '14', '13', '12', '11', 'latest') which translate as follows: + * latest: Latest SQL Server version found on agent * 15: SQL Server 2019 * 14: SQL Server 2017 @@ -38,6 +48,8 @@ Valid values for -PreferredVersion are: ('15', '14', '13', '12', '11', 'latest') * 12: SQL Server 2014 * 11: SQL Server 2012 +If you are unsure which version(s) of Microsoft.AnalysisServices.Deployment.exe you have installed, use the function \[Find-AnalysisServicesDeploymentExeLocations\](https://github.com/DrJohnT/DeployCube/blob/master/docs/Find-AnalysisServicesDeploymentExeLocations.md) to obtain a full list. + ```yaml Type: String Parameter Sets: (All) @@ -60,7 +72,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### Returns a string containing the version found, if the preferred version could not be found. ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Unpublish-Cube.md b/docs/Unpublish-Cube.md index c77eef9..9cb157b 100644 --- a/docs/Unpublish-Cube.md +++ b/docs/Unpublish-Cube.md @@ -13,7 +13,7 @@ Unpublish-Cube drops a tabular or multidimenstional cube from a SQL Server Analy ## SYNTAX ``` -Unpublish-Cube [-Server] [-CubeDatabase] [] +Unpublish-Cube [-Server] [-CubeDatabase] [[-Credential] ] [] ``` ## DESCRIPTION @@ -58,6 +58,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Credential +\[Optional\] A PSCredential object containing the credentials to connect to the AAS server. + +```yaml +Type: PSCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -67,7 +82,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Update-AnalysisServicesConfig.md b/docs/Update-AnalysisServicesConfig.md index d18ac4d..a680a45 100644 --- a/docs/Update-AnalysisServicesConfig.md +++ b/docs/Update-AnalysisServicesConfig.md @@ -16,7 +16,8 @@ Updates the various config files generated alongside the asdatabase file so they Update-AnalysisServicesConfig [-AsDatabasePath] [-Server] [-CubeDatabase] [[-ProcessingOption] ] [[-TransactionalDeployment] ] [[-PartitionDeployment] ] [[-RoleDeployment] ] [[-ConfigurationSettingsDeployment] ] - [[-OptimizationSettingsDeployment] ] [[-WriteBackTableCreation] ] [] + [[-OptimizationSettingsDeployment] ] [[-WriteBackTableCreation] ] [[-UserID] ] + [[-Password] ] [] ``` ## DESCRIPTION @@ -220,6 +221,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -UserID +{{ Fill UserID Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 11 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Password +{{ Fill Password Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 12 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -229,7 +260,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/docs/Update-TabularCubeDataSource.md b/docs/Update-TabularCubeDataSource.md index 8181f14..3330707 100644 --- a/docs/Update-TabularCubeDataSource.md +++ b/docs/Update-TabularCubeDataSource.md @@ -13,9 +13,10 @@ Updates the tabular cube's connection to the source SQL database. ## SYNTAX ``` -Update-TabularCubeDataSource [-Server] [-CubeDatabase] [-SourceSqlServer] - [-SourceSqlDatabase] [-ImpersonationMode] [[-ImpersonationAccount] ] - [[-ImpersonationPassword] ] [] +Update-TabularCubeDataSource [-Server] [-CubeDatabase] [[-Credential] ] + [-SourceSqlServer] [-SourceSqlDatabase] [[-SqlUserID] ] [[-SqlUserPwd] ] + [-ImpersonationMode] [[-ImpersonationAccount] ] [[-ImpersonationPwd] ] + [] ``` ## DESCRIPTION @@ -63,6 +64,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Credential +\[Optional\] A PSCredential object containing the credentials to connect to the AAS server. + +```yaml +Type: PSCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SourceSqlServer The name of the source SQL Server server or its IP address. Include the instance name and port if necessary. @@ -73,7 +89,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -88,7 +104,37 @@ Parameter Sets: (All) Aliases: Required: True -Position: 4 +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SqlUserID +{{ Fill SqlUserID Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SqlUserPwd +{{ Fill SqlUserPwd Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -106,7 +152,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 5 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -122,13 +168,13 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -ImpersonationPassword +### -ImpersonationPwd The password of the account that will be used to connect to the SQL Server database. Required for ImpersonationMode='ImpersonateAccount'. @@ -138,7 +184,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 10 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -154,7 +200,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ### Returns true if the cube's data source was updated successfully. ## NOTES Written by (c) Dr. -John Tunnicliffe, 2019 https://github.com/DrJohnT/DeployCube +John Tunnicliffe, 2019-2021 https://github.com/DrJohnT/DeployCube This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT ## RELATED LINKS diff --git a/test/AzureAS.Tests.ps1 b/test/AzureAS.Tests.ps1 index 0a36f40..f1d3d80 100644 --- a/test/AzureAS.Tests.ps1 +++ b/test/AzureAS.Tests.ps1 @@ -11,10 +11,18 @@ BeforeAll { import-Module -Name $ModulePath; function Get-AzureAsServer { - + $data = @{}; + + if ("" -eq "$Env:AzureAsServer") + { + throw "AzureAsServer environment variable is not set!"; + return $data; + } + $CurrentFolder = Split-Path -Parent $PSScriptRoot; $data.PathToCubeProject = "$CurrentFolder\examples\Azure\CubeToPublish\bin\Model.asdatabase"; + $data.AzureAsServer = $Env:AzureAsServer; $data.CubeDatabase = "AzureTestCube"; @@ -30,6 +38,12 @@ BeforeAll { function Get-AzureSqlServer { $data = @{}; + + if ("" -eq "$Env:AzureSqlServer") + { + throw "AzureSqlServer environment variable is not set!"; + return $data; + } $data.AzureSqlServer = $Env:AzureSqlServer; $data.SqlServerDatabase = 'DatabaseToPublish'; $data.SqlUserID = $Env:AzureSqlUserID;