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
#!/bin/bash | |
az group create --name WebServers --location westus2 | |
az vm create \ | |
--resource-group WebServers \ | |
--name WEB1 \ | |
--image win2016datacenter \ | |
--admin-username sysadmin \ | |
--size Standard_DS2_v2 |
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 New-Sp { | |
param($Name, $Password) | |
$spParams = @{ | |
StartDate = Get-Date | |
EndDate = Get-Date -Year 2030 | |
Password = $Password | |
} | |
$cred= New-Object Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential -Property $spParams |
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
Configuration IIS | |
{ | |
# This will generate three .mof files; web1.mof, web2.mof, web3.mof | |
Node ('web1', 'web2', 'web3') | |
{ | |
#ensure IIS is installed | |
WindowsFeature IIS | |
{ | |
Name = 'web-server' | |
Ensure = 'Present' |
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
#!/bin/bash | |
az group create --name MySonarServer --location westus2 | |
az container create -g MySonarServer \ | |
--name sonarqubeaci \ | |
--image sonarqube \ | |
--ports 9000 \ | |
--dns-name-label cssonar \ | |
--cpu 2 --memory 3.5 |
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
#!/bin/bash | |
az group create --name cs-aks-prod-rg --location westus2 | |
az aks create \ | |
--resource-group cs-aks-prod-rg \ | |
--name cs-prod \ | |
--node-count 1 \ | |
--generate-ssh-keys |
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
# set or increment the ForceUpdateTag using a string value | |
$PropertiesObject = @{ | |
ForceUpdateTag = 3; | |
} | |
# update the extention on an existing VM | |
Set-AzureRmResource -PropertyObject $PropertiesObject ` | |
-ResourceGroupName DemoVM ` | |
-ResourceType Microsoft.Compute/virtualMachines/extensions ` | |
-ResourceName DemoVM/CustomScriptExtension ` |
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
using Microsoft.Azure.ServiceBus; | |
using System; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace SBQuickStart | |
{ | |
class Program | |
{ |
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 a resource group for the serivces we're going to create | |
az group create --name "AKS-Demo" --location westeurope | |
az group show --name "AKS-Demo" | |
#Get a list of the versions available | |
az aks get-versions --location westeurope -o table | |
#Check out some of the options available to us when creating our managed cluster | |
az aks create -h | more |
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
#private function | |
function new-baseEncode ($pat) { | |
$encoded = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes((":{0}" -f $pat))) | |
Write-Output $encoded | |
} | |
#public function | |
function New-EncodedMessage ($name, $data) { | |
$encoded = new-baseEncode $data |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.RazorPages; | |
using System.Security.Claims; | |
namespace CloudSkills.Pages |