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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"deploymentLocation": { | |
"defaultValue": "westeurope", | |
"type": "string" | |
}, | |
"vmSize": { | |
"defaultValue": "Standard_D1_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
Get-AzureRmLocation | %{ Get-AzureRmVMUsage -Location $_.Location | Add-Member Location $_.Location -PassThru } | %{ $_ | Add-Member Percent ($_.CurrentValue/$_.Limit*100) -PassThru } | Sort Percent -Descending | ft Location,@{Label="Name";Expression={$_.Name.LocalizedValue}},CurrentValue,Limit,Percent |
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 UP DEMO STORAGE | |
############################################################# | |
# Parameters | |
$prefix = "rbdemo" # CHANGE THIS! | |
$rgName = $prefix + "backup" | |
$location = "northeurope" | |
$filesStorage = $prefix + "files" | |
$filesStorageSku = "Standard_LRS" # Use LRS for file share |
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
# | |
# To run this script from here, run the following in an admin PowerShell console: | |
# . { iwr -useb https://gist.githubusercontent.com/rupertbenbrook/ae369cf962b7b3e134aa027d83bff4e3/raw/DownloadUpdates.ps1 } | iex | |
# | |
# Download and install any updates, rebooting if needed | |
Write-Host "Searching for updates..." | |
$update = New-Object -ComObject "Microsoft.Update.Session" | |
$updateSearch = $update.CreateUpdateSearcher() | |
$result = $updateSearch.Search("IsInstalled=0 and Type='Software' and IsHidden=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
<!-- | |
This relies on a number of properties being defined in API Management: | |
• EnableCache – Either “true” or “false”. This is used to enable and disable caching of tokens. | |
• OAuth2TokenEndpoint – The AAD OAuth2 token endpoint URI to get a token from. It takes the form https://login.microsoftonline.com/<subscription-guid>/oauth2/token. | |
• OAuth2ClientCredentials – The client ID GUID of the AAD application registered for the API Management server to authenticate. | |
• OAuth2ClientSecret – The client secret key generated for the AAD application registered for the API Management server. | |
• OAuth2Resource – The application ID URI for the application whose API is being accessed, and who is enabled for delegation in the AAD application registered for the API Management server. | |
--> |
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
7zip.install,git.install,putty.install,nodejs,windowsazurepowershell,azcopy,azurestorageexplorer,paint.net,keepass.install,sysinternals,googlechrome,visualstudiocode,sql-server-management-studio |
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)] | |
$ResourceGroupName, | |
[Parameter(Mandatory=$true)] | |
$ZoneName, | |
$TTL = 3600 | |
) |
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/sh | |
# Initial set up script for Alpine as a Docker host in a Hyper-V VM | |
# Based on https://wiki.alpinelinux.org/wiki/Docker and https://wiki.alpinelinux.org/wiki/Hyper-V_guest_services | |
# Tested on Alpine 3.10 | |
# wget -O - https://bit.ly/alpine-docker | sh | |
# Include community repo and update/upgrade | |
sed -i '/alpine\/v3.10\/community/s/^#*//g' /etc/apk/repositories | |
apk update | |
apk upgrade |
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
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | |
Start-Service sshd | |
Set-Service -Name sshd -StartupType 'Automatic' | |
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force |
OlderNewer