This file contains hidden or 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
# Input bindings are passed in via param block. | |
param($Timer) | |
# Define variables | |
$SrcStgAccURI = "https://sourceblobstg.blob.core.windows.net/" | |
$SrcBlobContainer = "myblobs" | |
$SrcSASToken = SAS_TOKEN_SOURCE | |
$SrcFullPath = "$($SrcStgAccURI)$($SrcBlobContainer)?$($SrcSASToken)" | |
$DstStgAccURI = "https://destinationfilestg.file.core.windows.net/" |
This file contains hidden or 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": { | |
"clusterName": { | |
"type": "string", | |
"metadata": { | |
"description": "The name of the HDInsight cluster to create." | |
} | |
}, |
This file contains hidden or 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": { | |
"clusterName": { | |
"type": "string", | |
"metadata": { | |
"description": "The name of the HDInsight cluster to create." | |
} | |
}, |
This file contains hidden or 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 existing Application Gateway config | |
$appgw = Get-AzApplicationGateway -ResourceGroupName $resGroupName -Name $appgwName | |
$listener = Get-AzApplicationGatewayHttpListener -Name "apim-gw-listener01" -ApplicationGateway $appgw | |
$sinkpool = Get-AzApplicationGatewayBackendAddressPool -ApplicationGateway $appgw -Name "sinkpool" | |
$pool = Get-AzApplicationGatewayBackendAddressPool -ApplicationGateway $appgw -Name "apimbackend" | |
$poolSettings = Get-AzApplicationGatewayBackendHttpSettings -ApplicationGateway $appgw -Name "apim-gw-poolsetting" | |
# Add external path rule + map | |
$pathRule = New-AzApplicationGatewayPathRuleConfig -Name "external" -Paths "/external/*" -BackendAddressPool $pool -BackendHttpSettings $poolSettings | |
$appgw = Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $appgw -Name "external-urlpathmapconfig" -PathRules $pathRule -DefaultBackendAddressPool $sinkpool -DefaultBackendHttpSettings $poolSettings |
This file contains hidden or 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
# Example script to using the -scope and notscope parameters for the New-AzureRmPolicyAssignment cmdlet | |
# script applies a policy subscription wide but also excludes specific resource groups | |
# Login to Azure | |
Connect-AzureRmAccount | |
# Get the subscription to assign the policy to | |
$subscription = Get-AzureRmSubscription -SubscriptionName "subscriptioname" | |
Write-Host $subscription.Id |
This file contains hidden or 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
New-AzureRmPolicyAssignment -Name 'Audit secure transfer to storage accounts' -PolicyDefinition $Policy -Scope $subscription -NotScope $resourceGroup |
This file contains hidden or 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 | |
Connect-AzureRmAccount | |
Select-AzureRmSubscription -SubscriptionName 'yoursubscription' | |
# Create a new resource group to host our network resources | |
$location = "West Europe" | |
$resourcegroup = New-AzureRmResourceGroup -Name "network-rg" -Location $location | |
# Create a new VNet | |
$virtualnetwork = New-AzureRmVirtualNetwork -Name "test-we-vnet" -ResourceGroupName $resourcegroup.ResourceGroupName -Location $location -AddressPrefix "10.10.0.0/16" |