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
## -------------------------------------------------------------------------------------- | |
## | |
## This script is used to control how we deploy packages to Windows Azure. | |
## Orignial script (https://gist.github.com/PaulStovell/5234255) customized for | |
## Staging-To-Production with VIP swap deployment. | |
## | |
## NOTE: the script will only do Staging+VIP swap if $OctopusAzureSlot == "Staging". | |
## If $OctopusAzureSlot == anything else, the script will deploy directly to that slot | |
## without any further swapping. | |
## |
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
{ | |
"homepage": "http://www.iis.net/learn/install/web-platform-installer/web-platform-installer-v4-command-line-webpicmdexe-rtw-release", | |
"version": "7.1.50430", | |
"license" : "http://www.microsoft.com/web/webpi/eula/webpi_45_en.htm", | |
"architecture": { | |
"64bit": { | |
"url": "http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi", | |
"hash": "fd3aa11da27a4698d9fd1fb61dcb5cae6d95ecf70554f0d655b0caf44b0d0ac6" | |
}, |
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
; AutoHotkey script, download from: | |
; http://www.autohotkey.com/ | |
; NOTE: Save this file with Windows line endings i.e. \r\n | |
; | |
cmd_line := "C:\bin\cygwin\bin\mintty.exe /bin/zsh --login" | |
wnd_class := "ahk_class mintty" | |
#c:: |
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
echo For my cloud agents, I had to get the pfx alias, Import the CARoot.cer, merge the pfx, and then change the password. | |
echo Based on https://github.com/haron/startssl-java and https://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html | |
cd %~dp0 | |
set JAVA_HOME=C:\BuildAgent\jre | |
set KEYTOOL=%JAVA_HOME%\bin\keytool | |
set KEYSTORE=%JAVA_HOME%\lib\security\cacerts | |
set PASSWORD=changeit | |
echo "Importing StartSSL certificates into %KEYSTORE%" > run.log | |
rem C:\BuildAgent>jre\bin\keytool -list -keystore .\conf\ssl\build.cloudapp.net.pfx -storetype pkcs12 |
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
$AzureAccountPassword = "xxxxxxxxxxxxxxxxxxxxxxxxx" | |
$AzureAccountUsername = "xxxxxxxxxxxxxxxxxxxxxxxxx" | |
$AzureAccountTenantId = "xxxxxxxxxxxxxxxxxxxxxxxxx" | |
$secpasswd = ConvertTo-SecureString -AsPlainText $AzureAccountPassword -Force | |
$mycreds = New-Object System.Management.Automation.PsCredential($AzureAccountUsername,$secpasswd ) | |
Login-AzureRmAccount -ServicePrincipal -Credential $mycreds -TenantId $AzureAccountTenantId | |
Get-AzureWebsite |
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
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} | |
[System.Net.ServicePointManager]::Expect100Continue = {$false} | |
[System.Net.ServicePointManager]::CheckCertificateRevocationList = $true; | |
[System.Net.ServicePointManager]::DefaultConnectionLimit = 1000; | |
[System.Net.ServicePointManager]::MaxServicePoints = 1000; | |
[System.Net.ServicePointManager]::ReusePort = $true; | |
[System.Net.ServicePointManager]::UseNagleAlgorithm = $false; | |
[System.Net.ServicePointManager]::EnableDnsRoundRobin = $false; | |
$url = "https://data-nsr.udir.no" |
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
### Server management tools preview (next month): https://blogs.technet.microsoft.com/servermanagement/2016/02/09/introducing-server-management-tools/ | |
### View the online docs | |
start https://docs.microsoft.com/en-us/powershell/azuread/v2/azureactivedirectory | |
### Find the module | |
Find-Module AzureAD | Select-Object * | |
<# | |
Version Name Repository Description |
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
<# | |
Script showing how to create a KeyVault vault and enable logging | |
(GUIDs redacted) | |
#> | |
New-AzureRmResourceGroup -Name cmartRG0614 -Location westus | |
<# | |
ResourceGroupName : cmartRG0614 | |
Location : westus | |
ProvisioningState : Succeeded |
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
#Create the cert | |
New-SelfSignedCertificate -DnsName 'foo.azurewebsites.net' -CertStoreLocation cert:\CurrentUser\My -KeyAlgorithm RSA -KeyLength 2048 -KeyExportPolicy Exportable #-KeyUsage DigitalSignature,nonRepudiation,keyEncipherment | |
#Look for the cert | |
dir Cert:\CurrentUser\My | |
#Export the cert to a PFX file | |
$mypwd = ConvertTo-SecureString -String "WhoFedTheDogCorn?" -Force –AsPlainText | |
dir Cert:\CurrentUser\My | Where Subject -EQ 'CN=foo.azurewebsites.net' | Export-PfxCertificate -ChainOption BuildChain -Password $mypwd -FilePath E:\Scratch\fooCert.pfx |
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
ALTER DATABASE MYDB SET RECOVERY SIMPLE | |
USE MYDB | |
DBCC SHRINKFILE ('MYDB_LOG', 1) | |
DBCC SHRINKFILE ('MYDB', 1) |
OlderNewer