Skip to content

Instantly share code, notes, and snippets.

View BernieWhite's full-sized avatar
🏠
Working from home

Bernie White BernieWhite

🏠
Working from home
View GitHub Profile
@BernieWhite
BernieWhite / cn-demo-script.ps1
Last active June 28, 2017 11:49
Windows containers demo script: aspnetcore
# STEP : Create docker file in the current path
Set-Content -Path .\dockerfile -Value '# Sample Dockerfile
# Example docker file for helo world
# Select a base image
FROM microsoft/dotnet:latest
# Set metadata
MAINTAINER bernie@contoso.local
@BernieWhite
BernieWhite / gist:31481ce6daac6a6e0b33430d6f53579f
Created January 18, 2018 05:50
azure-automation-service-arm.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"accountName": {
"type": "string"
},
"accountLocation": {
"type": "string",
"defaultValue": "westcentralus",
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmLocation": {
"type": "string"
},
"vmName": {
"type": "string"
},
@BernieWhite
BernieWhite / gist:53a288922856b0cc88a0289f20de67fa
Created January 18, 2018 06:37
azure-dc-parameters-arm.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"value": ""
},
"vmLocation": {
"value": ""
},
#
# Domain Controller DSC Configuration
#
configuration dcConfiguration {
$domainName = Get-AutomationVariable -Name 'domainName';
$adCredential = Get-AutomationPSCredential -Name 'domainAdmin';
Import-DscResource -ModuleName xActiveDirectory, xComputerManagement, xNetworking, xStorage, PSDesiredStateConfiguration
@{
AllNodes = @(
@{
NodeName = 'newForest'
PSDscAllowPlainTextPassword = $True
CreateForest = $True
},
@{
NodeName = 'existingForest'
PSDscAllowPlainTextPassword = $True
@BernieWhite
BernieWhite / azure-web-vm-configuration.ps1
Last active October 14, 2020 06:36
DSC configuration for an IIS web server
configuration webConfiguration
{
param (
[Parameter(Mandatory = $False)]
[String]$websitePackageUri
)
Import-DscResource -ModuleName PSDesiredStateConfiguration
#
# Domain Controller DSC Configuration
#
configuration dcConfigurationFile {
$domainName = Get-AutomationVariable -Name 'domainName';
$adCredential = Get-AutomationPSCredential -Name 'domainAdmin';
Import-DscResource -ModuleName xActiveDirectory, xComputerManagement, xNetworking, xStorage, PSDesiredStateConfiguration
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmssLocation": {
"type": "string"
},
"vmssName": {
"type": "string"
},
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmssLocation": {
"value": "westus2"
},
"vmssName": {
"value": "be-web-ss2"
},