Skip to content

Instantly share code, notes, and snippets.

View davidobrien1985's full-sized avatar

David O'Brien davidobrien1985

View GitHub Profile
{
"type": "Microsoft.KeyVault/vaults",
"apiVersion": "2018-02-14",
"name": "[concat(parameters('productName'), '-kv')]",
"location": "[resourceGroup().location]",
"tags": "[parameters('tags')]",
"properties": {
"enabledForDeployment": true,
"enabledForTemplateDeployment": true,
"enabledForDiskEncryption": true,
{
"type": "providers/diagnosticSettings",
"name": "Microsoft.Insights/diagnostic_primary",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers/databases', variables('primarySqlServerName'), parameters('databaseName'))]"
],
"apiVersion": "2017-05-01-preview",
"properties": {
"name": "Diagnostic_test",
"storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountNamePrimary'))]",
@davidobrien1985
davidobrien1985 / azure-sql-deploy.json
Created May 15, 2018 12:45
Azure SQL ARM template
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"administratorLogin": {
"type": "string"
},
"sqlPassword": {
"type": "securestring"
},
04ea771dc814209617ed63b03e504caa56ba774ce1c06d5b08832383ca275602dc0a1b2db0db7f46af5d148986b8eed91f8fded4dd0cd98416a48dd45000d26791
Configuration DSCFromGPO
{
Import-DSCResource -ModuleName 'PSDesiredStateConfiguration'
Import-DSCResource -ModuleName 'AuditPolicyDSC'
Import-DSCResource -ModuleName 'SecurityPolicyDSC'
Import-DSCResource -ModuleName 'BaselineManagement'
# Module Not Found: Import-DSCResource -ModuleName 'xSMBShare'
# Module Not Found: Import-DSCResource -ModuleName 'DSCR_PowerPlan'
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling .NET Web Application deployment.
MSBuild auto-detection: using msbuild version '14.0' from 'D:\Program Files (x86)\MSBuild\14.0\bin'.
All packages listed in packages.config are already installed.
D:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\o365_compiled\o365_compiled.csproj]
D:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Azure.WebJobs, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitectur
using System;
using System.IO;
using System.Net;
using Newtonsoft.Json.Linq;
public class LicensingHelper
{
public static JArray GetO365Skus(double apiVersion, string apiToken)
{
var uri = $"https://graph.windows.net/myorganization/subscribedSkus?api-version={apiVersion}";
$ErrorActionPreference = 'Stop'
$VerbosePreference = 'Continue'
$deployPath = 'C:\Program Files\RDS_Core\WebAccess'
# Set up the DSC folder structure
$dscPath = Join-Path $deployPath 'DSC'
New-Item -Path $dscPath -ItemType Directory -Force
# Install RDS connection broker components
==> amazon-ebs: Provisioning with Powershell...
==> amazon-ebs: Provisioning with shell script: C:\dev\git\versent\ref-remotedesktopservices\packer/scripts/install_rds_webaccess.ps1
2016/12/02 12:16:12 ui: ==> amazon-ebs: Provisioning with shell script: C:\dev\git\versent\ref-remotedesktopservices\packer/scripts/install_rds_webaccess.ps1
2016/12/02 12:16:12 packer.exe: 2016/12/02 12:16:12 Opening C:\dev\git\versent\ref-remotedesktopservices\packer/scripts/install_rds_webaccess.ps1 for reading
2016/12/02 12:16:12 packer.exe: 2016/12/02 12:16:12 [INFO] 1110 bytes written for 'uploadData'
2016/12/02 12:16:12 [INFO] 1110 bytes written for 'uploadData'
2016/12/02 12:16:12 packer.exe: 2016/12/02 12:16:12 Uploading file to 'c:/Windows/Temp/script.ps1'
2016/12/02 12:16:14 packer.exe: #< CLIXML
2016/12/02 12:16:15 packer.exe: <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></T
@davidobrien1985
davidobrien1985 / packer.json
Created December 2, 2016 01:18
packer.json
{
"variables": {
"aws_source_ami": "ami-3859605b",
"aws_instance_type": "t2.medium",
"aws_instance_profile": "",
"aws_vpc_id": "",
"aws_subnet_id": "",
"aws_region": "ap-southeast-2",
"soe_version": "",
"build_number": ""