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": { | |
| "adminUsername": { | |
| "type": "string", | |
| "metadata": { | |
| "description": "Username for the Virtual Machine." | |
| } | |
| }, |
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": { }, | |
| "variables": { | |
| "nicIPConfigurations": [ | |
| { | |
| "privateIPAllocationMethod": "Dynamic", | |
| "subnet": { | |
| "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets/', 'vNet', 'Subnet-1')]" |
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": { }, | |
| "variables": { | |
| "storeName": "[concat('store', uniqueString(resourceGroup().id))]" | |
| }, | |
| "resources": [ | |
| { | |
| "name": "[variables('storeName')]", |
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
| # | |
| #This script will call the validateMoveResources api to see if resources can be moved (before you try to actually move them) | |
| # | |
| $subscriptionId = '...' | |
| $sourceResourceGroup = 'SourceGroup' | |
| $destinationResourceGroup = 'DestGroup' #must exist | |
| # Create an array of resourceIds that are to be moved | |
| $resourcesToMove = @( | |
| "/subscriptions/$subscriptionId/resourceGroups/$sourceResourceGroup/providers/Microsoft.Network/publicIPAddresses/somePublicIp" |
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
| param | |
| ( | |
| [string]$sourceBlobUri, | |
| [String]$StorageAccountName, | |
| [string]$StorageAccountResourceGroupLocation, | |
| [String]$StorageContainerName = 'vhds', | |
| [String]$BlobName = 'marketplace.vhd' | |
| ) | |
| #get Dest Storage context |
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
| #Requires -Module AzureRM.KeyVault | |
| # Use this script to create a certificate that you can use to secure a Service Fabric Cluster or other VM/SSL scenario | |
| # This script requires an existing KeyVault that is EnabledFor[Template]Deployment (property depends on the scenario) | |
| # To create a new vault and set the EnabledForDeployment/EnabledForTemplateDeployment property run: | |
| # | |
| # New-AzureRmResourceGroup -Name KeyVaults -Location WestUS | |
| # New-AzureRmKeyVault -VaultName $KeyVaultName -ResourceGroupName KeyVaults -Location WestUS -EnabledForDeployment -EnabledForTempalteDeployment | |
| # | |
| # Once the certificate is created and stored in the vault, the script will provide the parameter values needed for template deployment |
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
| # | |
| #this script will delete deployments from a resourceGroup if the number of deployments exceeds the number specified by the Max parameter | |
| # | |
| Param( | |
| [string] [Parameter(Mandatory = $true)] $ResourceGroupName, | |
| [int] [Parameter(Mandatory = $true)] $Max, | |
| [string] [Parameter(Mandatory = $true)] $tenantId, | |
| [string] [Parameter(Mandatory = $true)] $ServicePrincipalId, | |
| [securestring] [Parameter(Mandatory = $true)] $ServicePrincipalSecret, |
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
| <# | |
| .Synopsis | |
| This script will deploy an Azure Resource Manager Template using the "az rest" command to invoke the REST api directly | |
| .Description | |
| This script will deploy an Azure Resource Manager Template using the "az rest" command to invoke the REST api directly. | |
| It deploys at resourceGroup scope but can be easily modified for any scope of deployment. | |
| The current account context must already be selected before executing the script, use 'az account show' to show the context | |
| #> |
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
| #Requires -Module AzureRM.Profile | |
| #Requires -Module AzureRM.KeyVault | |
| #Login and Select the default subscription if needed | |
| #Login-AzureRmAccount | |
| #Select-AzureRmSubscription -SubscriptionName 'subscription name' | |
| #Change the values below before running the script | |
| $VaultName = 'myvault' #Globally Unique Name of the KeyVault | |
| $VaultLocation = 'East US' #Location of the KeyVault |
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
| function api { | |
| <# | |
| .Synopsis | |
| Get the api versions and locations for a resource type. | |
| .Description | |
| Lists all the available api versions and locations for a given resource type. Information is pulled from the /providers api | |
| which returns the information in the manifest published to ARM. | |
| .Notes | |
| The resource parameter requires the format of Namespace/type, e.g. Microsoft.Storage/storageAccounts | |
| > api Microsoft.Storage/storageAccounts |
OlderNewer