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( | |
[parameter(Mandatory = $true)] [string]$functionName, | |
[parameter(Mandatory = $true)] [string]$appName, | |
[parameter(Mandatory = $true)] [string]$resourceGroup | |
) | |
function Get-KuduCredentials($appName, $resourceGroup) { | |
[xml]$x = Get-AzureRmWebAppPublishingProfile -ResourceGroupName $resourceGroup -Name $appName | |
$user = $x.publishData.publishProfile[1].userName.Split("\") | Select-Object -Last 1 |
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( | |
[parameter(Mandatory=$true)] [string]$functionName, | |
[parameter(Mandatory=$true)] [string]$appName, | |
[parameter(Mandatory=$true)] [string]$resourceGroup, | |
[parameter(Mandatory=$true)] [string]$key | |
) | |
function Get-KuduCredentials($appName, $resourceGroup) { | |
[xml]$x = Get-AzureRmWebAppPublishingProfile -ResourceGroupName $resourceGroup -Name $appName |
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 Create-VstsRelease { | |
[CmdletBinding()] | |
param( | |
[string] | |
[ValidateNotNullOrEmpty()] | |
$vstsAccount | |
, [string] | |
[ValidateNotNullOrEmpty()] | |
$projectName |
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 Install-ADAuthenticationLibraryforSQLServer { | |
# from https://bzzzt.io/post/2018-05-25-horrible-adalsql-issue/ | |
$workingFolder = Join-Path $env:temp ([System.IO.Path]::GetRandomFileName()) | |
New-Item -ItemType Directory -Force -Path $workingFolder | |
$uri = "https://raw.githubusercontent.com/RichieBzzzt/adalsqlmsi/master/msi/adalsql.msi" | |
$splitArray = $uri -split "/" | |
$fileName = $splitArray[-1] |
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
Import-Module PoshSSDTBuildDeploy -Force | |
$GetDotNetVersion = Test-NetInstalled | |
$net471sdk = "https://download.microsoft.com/download/9/0/1/901B684B-659E-4CBD-BEC8-B3F06967C2E7/NDP471-DevPack-ENU.exe" | |
$net471 = "https://download.microsoft.com/download/9/E/6/9E63300C-0941-4B45-A0EC-0008F96DD480/NDP471-KB4033342-x86-x64-AllOS-ENU.exe" | |
If (!(Test-Path "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.1 Tools") ) { | |
$agentTempFolderName = Join-Path $env:temp ([System.IO.Path]::GetRandomFileName()) | |
New-Item -ItemType Directory -Force -Path $agentTempFolderName | |
Write-Verbose "Temporary Agent download folder: $agentTempFolderName" -verbose | |
Install-DotNet -WorkingFolder $agentTempFolderName -uri $net471sdk |
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.Sql/servers/firewallRules", | |
"kind": "v12.0", | |
"name": "[concat(variables('sqlServerName'), '/', variables('firewallRules_AllowAllAzureServices'))]", | |
"apiVersion": "2014-04-01-preview", | |
"location": "[resourceGroup().location]", | |
"scale": null, | |
"properties": { | |
"startIpAddress": "0.0.0.0", |
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
#https://download.microsoft.com/download/0/6/4/064F84EA-D1DB-4EAA-9A5C-CC2F0FF6A638/vc_redist.x64.exe | |
if ((Test-Path 'HKLM:\SOFTWARE\Classes\Installer\Dependencies\,,amd64,14.0,bundle\Dependents') -eq $false) { | |
Write-Host "No C++ Thingy installed. Installing..." | |
$vcRDist = "C:\Users\richardlee\Downloads\vc_redist.x64.exe" | |
$vcRDistArgs = {/install /quiet /norestart} | |
$process = Start-Process -Verb RunAs -Filepath $vcRDist -ArgumentList $vcRDistArgs -Wait -PassThru | |
Write-Host "Exit code: $($process.ExitCode)" | |
if ($process.ExitCode -ne 0 ) { | |
Write-Error "Oh dear!" | |
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
$VersionNumbers = @() | |
$VersionNumbers = "1.0.0", "1.0.0.0", "1.0.t", "1.0.0.t", "1.0.0.0.t" ,"1.0.0.5", "1.0.0.4567", "t.0.0.345", "1.rt.0.345" | |
$alphaRegex = "^(\d+\.)?(\d+\.)?(\*|\d+)$" | |
$ErrorActionPreference = "SilentlyContinue" | |
foreach ($semver in $VersionNumbers) { | |
Write-Host $semver -ForegroundColor Green | |
if (($semver -match $alphaRegex) -eq $false) { | |
$betaRegex = "^(\d+\.)?(\d+\.)?(\d+\.)?(\*|\d+)$" | |
if (($semver -match $betaRegex) -eq $false) { |
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
<Target Name="DevEnvInstaller"> | |
<PropertyGroup> | |
<DevEnv>C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com</DevEnv> | |
<SolutionFile>$(SolutionRoot)\Database\Ispac\SSISPackages.sln</SolutionFile> | |
<ProjectFile>$(SolutionRoot)\Database\ISPac\SSISPackages\ETLBulkLoader.dtproj</ProjectFile> | |
<Configuration>Release</Configuration> | |
</PropertyGroup> | |
<Exec> | |
Command=""$(devenv)" "$(SolutionFile)" /Rebuild "$(Configuration)" /Project "$(ProjectFile)" /ProjectConfig "$(Configuration)" /Log" |
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
#azfun init MyFunctionProj | |
if ((Test-Path "C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0") -eq $false) { | |
Write-Host "No Net Core 2.0 SDK installed. Installing..." | |
$NetCore = "C:\Users\richardlee\Downloads\dotnet-sdk-2.0.0-win-x64.exe" | |
$NetCoreArgs = {/install /quiet /norestart} | |
$process = Start-Process -Verb RunAs -Filepath $NetCore -ArgumentList $NetCoreArgs -Wait -PassThru | |
Write-Host "Exit code: $($process.ExitCode)" | |
if ($process.ExitCode -ne 0 ){ | |
Write-Error "Oh dear!" | |
Throw |