Skip to content

Instantly share code, notes, and snippets.

@delorgedj
delorgedj / gist:3b25af0e1ccd5d4e19ba1bc5a0a0013a
Created January 30, 2018 15:47
Add Multiple Users to Azure ARM Resource Group RBAC Role
################## RBAC ROLES SCRIPT ############################
#
#Author DJD 4/11/2017 ###
################################################################
#
##Login to Azure ARM
##This script gathers information about Azure ARM REsources
$azureAccountName ="username@.onmicrosoft.com"
$azurePassword = ConvertTo-SecureString "passwordhere" -AsPlainText -Force
@delorgedj
delorgedj / AzureARMDMZCreationwhAPPGateway
Created January 10, 2018 20:16
Azure ARM DMZ Creation with App Gateway
### Author DJD ####
### Login to Azure and Switch to ARM Mode ####
############## Change Variable to match the nameing conventions and VNET you are deploying ##################
#### Variables ############################################################################################################################
$RG= "D-RGE-DMZ01" ## Name of Resource Group##
$LOC= "East US" ### Location of Resource Group and Resources
$LOC2 = "East US 2" ####Automation Account Location ######
$STA1 ="dedatadmz01" ## First Storage Account for IOS Data #####
@delorgedj
delorgedj / Policy1.ps1
Created December 20, 2017 21:52
Create Multiple Policies In Azure ARM
#### This is the Retention Polocy
# Create Retention Policy object. Has to be modified from existing 'default' values provided by Azure
$RetPol = Get-AzureRmRecoveryServicesBackupRetentionPolicyObject -WorkloadType "AzureVM"
$BackupTime = (Get-Date).ToUniversalTime().Date.AddHours(23)
$Day = $true
$DayTime = $BackupTime
$DayRet = 1 #How many days?
###This Script creates Policies based on your requirements###
###DJD###
###8/17/2015 ###
##Login to Azure ARM
##This script gathers information about Azure ARM REsources
$azureAccountName ="YourAccountName"
$azurePassword = ConvertTo-SecureString "xxxxxxxxxxx" -AsPlainText -Force
$psCred = New-Object System.Management.Automation.PSCredential($azureAccountName, $azurePassword)
Add-AzureRmAccount -Credential $psCred
@delorgedj
delorgedj / Azure_RG_Creation_With_NSG_TAGS.ps1
Created December 4, 2017 18:29
Azure ASR Powershell Script to deploy Resource Group with NSG, Vault, and Tags
##Login to Azure ARM
##This script gathers information about Azure ARM REsources
$azureAccountName ="your account"
$azurePassword = ConvertTo-SecureString "password" -AsPlainText -Force
$psCred = New-Object System.Management.Automation.PSCredential($azureAccountName, $azurePassword)
Add-AzureRmAccount -Credential $psCred
##Switch Subscriptions and set subscriptions