Skip to content
Permalink
Browse files

1.0.32

  • Loading branch information...
potatoqualitee committed Aug 14, 2019
1 parent e567262 commit d51ed394df96f52b6923f15e705ab1a0a359b673
Showing with 6 additions and 3 deletions.
  1. +5 −2 allcommands.ps1
  2. +1 −1 dbatools.psd1
@@ -2079,8 +2079,6 @@ function Connect-DbaInstance {
return
}

Write-Message -Level Verbose -Message "Creating 'Active Directory Interactive' connstring"
$azureconnstring = "Data Source=tcp:$instance;UID=dbatools;Initial Catalog=$Database;Authentication=Active Directory Interactive"
if (-not $SqlCredential) {
Stop-Function -Message "When using Tenant, SqlCredential must be specified."
return
@@ -2094,11 +2092,16 @@ function Connect-DbaInstance {
# https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/configure-always-encrypted-using-powershell?view=sql-server-2017
$sqlconn = New-Object System.Data.SqlClient.SqlConnection $azureconnstring
Write-Message -Level Verbose -Message $sqlconn.ConnectionString
# assign this twice, not sure why but hey it works better
if ($accesstoken) {
$sqlconn.AccessToken = $accesstoken
}
$serverconn = New-Object Microsoft.SqlServer.Management.Common.ServerConnection $sqlconn
Write-Message -Level Verbose -Message "Connecting to Azure: $instance"
# assign it twice, not sure why but hey it works better
if ($accesstoken) {
$serverconn.AccessToken = $accesstoken
}
$null = $serverconn.Connect()
$server = New-Object Microsoft.SqlServer.Management.Smo.Server $serverconn
# Make ComputerName easily available in the server object
@@ -11,7 +11,7 @@
RootModule = 'dbatools.psm1'

# Version number of this module.
ModuleVersion = '1.0.31'
ModuleVersion = '1.0.32'

# ID used to uniquely identify this module
GUID = '9d139310-ce45-41ce-8e8b-d76335aa1789'

0 comments on commit d51ed39

Please sign in to comment.
You can’t perform that action at this time.