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( | |
| [Parameter()] | |
| [string]$Resource | |
| ) | |
| process { | |
| $providerNamespace = $resource.Split("/")[0] | |
| $resourceType = $resource.Split("/")[1] | |
| $resourceTypes = (Get-AzResourceProvider -ProviderNamespace $providerNamespace).ResourceTypes |
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
| #!/bin/bash | |
| for i in $(gh api -X GET /user/repos --field affiliation=owner --paginate | jq -r '.[].full_name'); do | |
| gh repo clone $i | |
| done |
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 Get-AzVMInfo { | |
| [CmdletBinding()] | |
| param() | |
| begin { | |
| $filePath = (Get-Location).Path + "\Azure_Virtual_Machine_Details_" + (Get-Date -UFormat "%m-%d-%Y") + ".csv" | |
| if (Test-Path -Path $filePath) { Remove-Item -Path $filePath -Force } | |
| $subscriptions = Get-AzSubscription -TenantId $TenantId | |
| } |
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": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "input": { | |
| "value": { | |
| "Name": "Audit-Linux-SSH-Password", | |
| "ResourceId": "/providers/Microsoft.Management/managementGroups/LT/providers/Microsoft.Authorization/policyDefinitions/Audit-Linux-SSH-Password", | |
| "ResourceName": "Audit-Linux-SSH-Password", | |
| "ResourceType": "Microsoft.Authorization/policyDefinitions", |
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( | |
| [Parameter()] | |
| [string]$Id, | |
| [Parameter()] | |
| [string]$RootId | |
| ) | |
| process { | |
| $WarningPreferenceState = $WarningPreference | |
| $WarningPreference = "SilentlyContinue" |
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-08-01/tenantDeploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "parentId": { | |
| "type": "string", | |
| "defaultValue": "[subscription().tenantId]" | |
| } | |
| }, | |
| "variables": { |
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-08-01/managementGroupDeploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "policyName": { | |
| "type": "string", | |
| "metadata": { | |
| "description": "Provide name for the policyDefinition." | |
| } | |
| }, |
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-08-01/tenantDeploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "subGuid": { | |
| "type": "string", | |
| "defaultValue": "[guid(deployment().name)]" | |
| }, | |
| "subDisplayName": { | |
| "type": "string" |
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-Job | Remove-Job | |
| Import-Module -Name Az.Accounts | |
| $profile = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile | |
| $client = New-Object Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient($profile) | |
| $token = $client.AcquireAccessToken("") | |
| $accessToken = $token.AccessToken | |
| $params = @{ |
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/2018-05-01/subscriptionDeploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| }, | |
| "functions": [ | |
| ], | |
| "variables": { | |
| }, | |
| "resources": [ |