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
trigger: | |
none | |
pr: | |
autoCancel: true | |
branches: | |
include: | |
- none | |
pool: |
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
cls | |
$sql_connection_string = "SERVER=.;Integrated Security=True;Database=master" | |
$sql_connection = new-object System.Data.SqlClient.SqlConnection ($sql_connection_string) | |
try { | |
$sql_connection.Open() | |
return $sql_connection.Database | |
} | |
catch { | |
Write-Error $_.Exception |
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
param( | |
[string] | |
$numberOfConcurrentActivities | |
) | |
$registryPath = "HKLM:\SOFTWARE\Microsoft\DataTransfer\DataManagementGateway\Gateway" | |
$Name = "WorkerProcessCount" | |
if (($numberOfConcurrentActivities -match "^[\d\.]+$") -eq $false) | |
{ | |
Write-Error "Number of concurrent activites needss to be a number." | |
Throw |
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
if ($null -eq (Get-AzContext)) { | |
Write-Host "No Azure Context... logging in." | |
Login-AzAccount -UseDeviceAuthentication | |
} | |
$groups = @("bob","tim" | |
) | |
$outputPath = "" |
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
[CmdletBinding()] | |
param ( | |
[string]$packageSourceUrl = 'https://pkgs.dev.azure.com/[orgname]/[randomguid]/_packaging/[feedname]/nuget/v3/index.json', | |
[string]$AzDOArtifactFeedName = '[feedname]', | |
[string]$AzDOPat, | |
[string]$ModuleFolderPath = (Join-Path -Path $env:SYSTEM_ARTIFACTSDIRECTORY -ChildPath "[.artifact.alias]\[folder.what.contains.module]") | |
) | |
# Variables | |
$feedUsername = 'NotChecked' |
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
Function Publish-DatabaseDeployment { | |
param( | |
$dacfxPath | |
, $dacpac | |
, $publishXml | |
, $targetConnectionString | |
, $targetDatabaseName | |
) | |
Write-Verbose 'Testing if DACfx was installed...' -Verbose |
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
#Requires -Version 3.0 | |
#Requires -Module AzureRM.Resources | |
#Requires -Module Azure.Storage | |
#Requires -Module @{ModuleName="AzureRm.Profile";ModuleVersion="3.0"} | |
Param( | |
[string] [Parameter(Mandatory = $true)] $ArtifactStagingDirectory, | |
[string] [Parameter(Mandatory = $true)][alias("ResourceGroupLocation")] $Location, | |
[string] $ResourceGroupName = (Split-Path $ArtifactStagingDirectory -Leaf), | |
[switch] $UploadArtifacts, |
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
function Set-LocalNotebook ($DatabricksFile, $Language, $LocalOutputPath, $Format = "SOURCE") { | |
$DatabricksFileForUrl = Format-DataBricksFileName -DataBricksFile $DatabricksFile | |
$uri = "$global:DatabricksURI/api/2.0/workspace/export?path=" + $DatabricksFileForUrl + "&format=$Format&direct_download=false" | |
switch ($Format) { | |
"SOURCE" { | |
$FileExtentions = @{"PYTHON" = ".py"; "SCALA" = ".scala"; "SQL" = ".sql"; "R" = ".r" } | |
$FileExt = $FileExtentions[$Language] | |
} | |
"HTML" { |
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
$aadConnectionString = "Server=tcp:$($AzureSqlFQDN),1433;Initial Catalog=myLittleDatabbase;Persist Security Info=False;User ID=$($aadAdminUser);Password=$($aadAdminPassword);MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication=""Active Directory Password"";" |
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
{ | |
"type": "Microsoft.KeyVault/vaults", | |
"name": "[parameters('keyVaultName')]", | |
"apiVersion": "2018-02-14", | |
"location": "[resourceGroup().location]", | |
"tags": {}, | |
"scale": null, | |
"properties": { | |
"sku": { | |
"family": "A", |
NewerOlder