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
| BeforeDiscovery { | |
| $policyRawContent = Get-content -Path "..\policies\auditVMExtension.json" -Raw | |
| $policyContent = $policyRawContent | ConvertFrom-Json -Depth 16 | |
| $parametersList = $policyContent.parameters | Get-Member -MemberType NoteProperty | select-object -ExpandProperty name | |
| } | |
| beforeAll { | |
| $policyRawContent = Get-content -Path "..\policies\auditVMExtension.json" -Raw | |
| $policyContent = $policyRawContent | ConvertFrom-Json -Depth 16 | |
| $policyIfContent = $policyContent.policyrule.if.allOf.count + $policyContent.policyrule.if.anyOf.count |
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 | |
| Create Azure Application, Certificate, SP and link them to Azure Automation Account as Run As Account | |
| .DESCRIPTION | |
| Create Azure Application, Certificate, SP and link them to Azure Automation Account as Run As Account | |
| .PARAMETER ResourceGroupName | |
| Name of the resource group where are located Automation Account and Keyvault | |
| .PARAMETER AutomationAccount | |
| Automation Account Name | |
| .PARAMETER KeyVaultName |
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
| trigger: | |
| - master | |
| resources: | |
| - repo: self | |
| variables: | |
| resourceGroupName: 'demo-whatif' | |
| templateFolder: "arm" | |
| templateFile: "demo-arm.json" |
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/2019-04-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "adminUsername": { | |
| "type": "string" | |
| }, | |
| "adminPassword": { | |
| "type": "securestring" | |
| } |
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
| # To copy a docker image from one registry to another | |
| # Registry A registry.mycompagny.com | |
| # Registry B azureregistrymycomp.azurecr.io | |
| # First login | |
| docker login registry.mycompagny.com -u XXX -p XX | |
| docker login azureregistrymycomp.azurecr.io -u XXXXX -p XXXXX | |
| # Pull the image | |
| docker pull registry.mycompagny.com/project/myimage:latest |
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
| [CmdletBinding()] | |
| param( | |
| [parameter(Mandatory = $true, ParameterSetName = "ByKeyword")] | |
| [parameter(Mandatory = $true, ParameterSetName = "BySessionId")] | |
| [string] | |
| $localFolder = "C:\work\ignite", | |
| [parameter(Mandatory = $true, ParameterSetName = "ByKeyword")] | |
| [string] | |
| $Keyword = "powershell", |
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
| $AzRessourceGroup = "StoragePerson-om" | |
| $AzstorageAccount = "testomdemodata001" | |
| $AzLocation = "FranceCentral" | |
| $AzStorageType = "Standard_LRS" | |
| $AzBlobContainerName = "imagesarchive" | |
| $AzStorage = New-AzureRmStorageAccount -ResourceGroupName $AzRessourceGroup -Name $AzstorageAccount -Type $AzStorageType -Location $AzLocation |