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": { | |
"adminUsername": { | |
"type": "string", | |
"metadata": { | |
"description": "User name for the Virtual Machine." | |
} | |
}, |
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
### Log into Azure | |
Add-AzureRmAccount | |
$Subscription = (Get-AzureRmSubscription | Out-GridView -Title "Choose a Source & Target Subscription ..." -PassThru) | |
Select-AzureRmSubscription -SubscriptionId $Subscription.Id | |
# Upload Certificate to Azure's Key Vault | |
$securepfxpwd = ConvertTo-SecureString –String 'password' –AsPlainText –Force # Password for the private key PFX certificate | |
$certificateName = 'My-Cert' | |
$vaultName = 'MyVault' |
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": { | |
"vmName": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of the VM" | |
} | |
}, |
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
$ShedService = New-Object -comobject 'Schedule.Service' | |
$ShedService.Connect() | |
$Task = $ShedService.NewTask(0) | |
$Task.RegistrationInfo.Description = 'M-Drive Mapping' | |
$Task.Settings.Enabled = $true | |
$Task.Settings.AllowDemandStart = $true | |
$trigger = $task.triggers.Create(9) | |
$trigger.Enabled = $true |
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
$net1 = new-object -ComObject WScript.Network | |
$net2 = new-object -ComObject Shell.Application | |
$net1.RemoveNetworkDrive("m:", $True, $True) | |
Start-Sleep -Seconds 2 | |
$net1.MapNetworkDrive("m:", "\\<StorageAccountName>.file.core.windows.net\music", $true, "<StorageAccountName>", "<StorageAccountKey>") | |
$net2.NameSpace('m:').Self.Name = "Drive 1 Label" | |
$net1.RemoveNetworkDrive("n:", $True, $True) | |
Start-Sleep -Seconds 2 |
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
{ | |
"bindings": [ | |
{ | |
"name": "req", | |
"type": "httpTrigger", | |
"direction": "in", | |
"methods": [ | |
"get" | |
], | |
"route": "austereo/{url}", |
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
# Setup the Azure Functions parameters | |
switch -RegEx ($REQ_QUERY_URL) | |
{ | |
\S {$url = $REQ_QUERY_URL} | |
default {$url = "http://legacy.scahw.com.au/$REQ_PARAMS_URL.xspf"} | |
} | |
# Invoke the web request to the URL | |
$iwr = Invoke-RestMethod -Uri $url |
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
# Recently tested fully with a later version of the Azure PowerShell module - Install-Module AzureRM -RequiredVersion 4.4.1 | |
#region Logon to Azure | |
Login-AzureRmAccount | |
$subscription = Get-AzureRmSubscription | Out-GridView -PassThru | |
Select-AzureRmSubscription -SubscriptionId $subscription.Id | |
#endregion | |
# Variables for YOu to fill in |
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
# Recently tested fully with a later version of the Azure PowerShell module - Install-Module AzureRM -RequiredVersion 4.4.1 | |
#region Logon to Azure | |
Login-AzureRmAccount | |
$subscription = Get-AzureRmSubscription | Out-GridView -PassThru | |
Select-AzureRmSubscription -SubscriptionId $subscription.Id | |
#endregion | |
# Variables for YOu to fill in |
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
# -------------------------------------------------------------------------------------------------------------- | |
# | |
# Title : Azure - Azure VM enable guest level monitoring | |
# Written by : Marc Kean | |
# Date : December, 2017 | |
# | |
# -------------------------------------------------------------------------------------------------------------- | |
# | |
# Script to turn on guest OS level monitoring across all VMs in a subscription. This will work its way through all | |
# ARM based Azure VMs one by one. VMs need to be turned on, otherwise they can't be enabled. Run again over and over |