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
Export the Private Key: First, you need to convert the JKS keystore to a PKCS12 format: | |
keytool -importkeystore -srckeystore [keystore_path] -destkeystore [output_file.p12] -deststoretype PKCS12 -srcstorepass [password] -deststorepass [password] | |
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
az login --tenant <tenant-id> | |
az sql db op list --resource-group my-rg --server mssql-srv --database mydb | |
az sql db op cancel --resource-group my-rg --server mssql-srv --database mydb --name <job-name(guid)> |
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
arg('').patchinstallationresources | |
| where type in ("microsoft.compute/virtualmachines/patchinstallationresults", "microsoft.hybridcompute/machines/patchinstallationresults") | |
| where properties.status == "Failed" or properties.status == "CompletedWithWarnings" | |
| where properties.lastModifiedDateTime > ago(1d) | |
| parse id with vmResourceId "/patchInstallationResults" * | |
| project vmResourceId | |
| distinct vmResourceId |
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
arg('').RecoveryServicesResources | |
| where type in~ ('microsoft.recoveryservices/vaults/backupjobs') | |
| extend vaultName = case(type =~ 'microsoft.dataprotection/backupVaults/backupJobs', properties.vaultName, type =~ 'Microsoft.RecoveryServices/vaults/backupJobs', split(split(id, '/Microsoft.RecoveryServices/vaults/')[1], '/')[0], '--') | |
| extend friendlyName = case(type =~ 'microsoft.dataprotection/backupVaults/backupJobs', strcat(properties.dataSourceSetName, '/', properties.dataSourceName), type =~ 'Microsoft.RecoveryServices/vaults/backupJobs', properties.entityFriendlyName, '--') | |
| extend dataSourceType = case(type =~ 'Microsoft.RecoveryServices/vaults/backupJobs', properties.backupManagementType, type =~ 'microsoft.dataprotection/backupVaults/backupJobs', properties.dataSourceType, '--') | |
| extend protectedItemName = split(split(properties.backupInstanceId, 'protectedItems')[1], '/')[1] | |
| extend vaultId = tostring(split(id, '/backupJobs')[0]) | |
| extend vaultSub = tostring(split(id, '/')[2]) | |
| |
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
AzureDiagnostics | |
| where OperationName contains "SecretNearExpiry" or OperationName contains "SecretExpired" | |
//| project SecretName = column_ifexists("eventGridEventProperties_data_ObjectName_s", "eventGridEventProperties_data_ObjectName_s") |
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
az login --tenant <tenant-id> | |
az keyvault set-policy --name <kv-name> -g <resource-group-name> --object-id <user-assigned-managed-identity-object-id> --certificate-permissions get list | |
az network application-gateway ssl-cert create -g <resource-group-name> --gateway-name <agw-name> -n <ssl-cert-name> --key-vault-secret-id <kv-secret-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
openssl pkcs12 -in C:\Temp\SelfSigned1.pfx -out C:\Temp\SelfSigned2.pem -nodes | |
openssl pkcs12 -export -out C:\Temp\SelfSigned2.pfx -in C:\Temp\SelfSigned2.pem |
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
Install ngrok via Chocolatey with the following command: choco install ngrok | |
ngrok config add-authtoken <auth_token> | |
ngrok http http://localhost:7071 --host-header="localhost:7071" | |
In Event Grid System Topic, create an event subscription of type web hook: | |
https://<random_identifier>.ngrok-free.app/runtime/webhooks/EventGrid?functionName=<function_name> | |
Set filter to event types |
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-AzResource | Select-Object * | Export-Csv -Path "C:path\to\AzureSubscriptionResources.csv" -NoTypeInformation |
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
Set-ExecutionPolicy RemoteSigned | |
Install-Module -Name Posh-ACME | |
$contactMail="<contact_mail>" | |
$domain="<domain>" | |
$password="<password>" | |
Set-PAServer LE_PROD | |
New-PACertificate $domain -AcceptTOS -Contact $contactMail -DnsPlugin AcmeDns -PluginArgs @{ACMEServer='auth.acme-dns.io'} -PfxPass $password |
NewerOlder