#ResourceGroup
This sounds like a "blame the AI editor" problem, not a PowerShell problem.

Lemme just fix this for you real quick:

~~~PowerShell
$azArgs = @('network', 'bastion', 'show', '--name', $BastionName, '--resource-group', $resourceGroup, '--query', 'sku')
az @azArgs
~~~

All fixed! Splatting FTW.
May 27, 2026 at 5:37 PM
I just managed to follow the PowerShell-ified az cli commands and successfully submit a JSON template with:

& az resource create --resource-group $resourceGroup --name $templateName --resource-type "Microsoft.VirtualMachineImages/imageTemplates" --is-full-object --properties "@$templatePath"
May 9, 2025 at 1:28 PM
The ResourceGroup API is still WIP, you can find the Flux Operator project here github.com/controlplane...
GitHub - controlplaneio-fluxcd/flux-operator: Flux Operator is a Kubernetes controller for managing the lifecycle of Flux CD
Flux Operator is a Kubernetes controller for managing the lifecycle of Flux CD - controlplaneio-fluxcd/flux-operator
github.com
October 22, 2024 at 4:17 PM
Does anyone know whether there's an equivalent of Bicep's uniqueString in PowerShell? For example, in Bicep I can do calculate a string based on the resource group and region -

uniqueString(resourceGroup().id, location))

I'm looking to do the same via PowerShell.
December 11, 2024 at 10:28 PM
Oops forgot to include the name parameters so it made up a default one using uniqueString(resourceGroup Id)...
April 3, 2025 at 7:38 AM
Create Azure backup of VM using Automation script in AzCli
echo "Logging In...." az login --service-principal -u $Clientid -p $Clientsecret --tenant $Tenantid az account set -s "ba-ib-at23055-neu-dev" RecoveryServicesVault="at23055vault-test" resourceGroup="AT23055_DRMDASHBOARD_DEV" vmName="xd934b23055dev2" az backup vault show --name $RecoveryServicesVault --resource-group $resourceGroup retVal=$? if [ $retVal -eq 0 ]; then echo "Vault Exists Already" else echo "Vault doesn't Exist!" echo "Creating a new Vault.." az backup vault create --resource-group $resourceGroup \ --name $RecoveryServicesVault \ --location northeurope fi az backup vault backup-properties set \ --name $RecoveryServicesVault \ --resource-group $resourceGroup \ --backup-storage-redundancy "LocallyRedundant" #GeoRedundant az backup protection check-vm --resource-group $resourceGroup --vm $vmName if [ $retVal -eq 0 ]; then echo "Virtual machine is protected Already" else echo "Virtual machine is not protected" echo "Creating Virtual machine Protection..." az backup protection enable-for-vm \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --vm $vmName \ --policy-name DefaultPolicy fi retention=`date +'%d-%m-%Y' -d "+1 year"` count=$(az backup job list --resource-group $resourceGroup --vault-name $RecoveryServicesVault --output table | grep -i 'InProgress' | wc -l) if [ $count -gt 0 ]; then echo "Backup is InProgress, Unable to initiate backup as another backup operation is currently in progress." echo "Checking the status of backup jobs..." az backup job list \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --output table exit 0 else echo "Initiating backup job.." az backup protection backup-now \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --container-name $vmName \ --item-name $vmName \ --backup-management-type AzureIaaSVM \ --retain-until $retention fi echo "Checking the status of backup jobs..." az backup job list \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --output table Please find below the concise explanation of the provided code snippet that is intended to manage Azure backup vaults and virtual machines using the Azure CLI: Explanation of the Code 1. Login to Azure: echo "Logging In...." az login --service-principal -u $Clientid -p $Clientsecret --tenant $Tenantid This logs into Azure using a service principal (a special Azure account typically used for automated scripts). It uses the client ID, client secret, and tenant ID provided in the variables. 1. Set the Azure Account: az account set -s "<Subscription_ID>" Sets the specific Azure subscription to use for the subsequent commands. 1. Define Variables: RecoveryServicesVault="vault-test" resourceGroup="RG_DEV" vmName="xdvmdev2" These lines define variables for the recovery services vault name, resource group, and virtual machine name. 1. Check if the Backup Vault Exists: az backup vault show --name $RecoveryServicesVault --resource-group $resourceGroup retVal=$? if [ $retVal -eq 0 ]; then echo "Vault Exists Already" else echo "Vault doesn't Exist!" echo "Creating a new Vault.." az backup vault create --resource-group $resourceGroup \ --name $RecoveryServicesVault \ --location northeurope fi * It checks if the specified backup vault exists. * If it does, it confirms its existence; if not, it creates a new backup vault in the specified location. 1. Set Backup Properties: az backup vault backup-properties set \ --name $RecoveryServicesVault \ --resource-group $resourceGroup \ --backup-storage-redundancy "LocallyRedundant" This sets the backup storage redundancy to "LocallyRedundant," meaning that the backups will be stored in a way that protects them from local failures. 1. Check VM Backup Protection Status: az backup protection check-vm --resource-group $resourceGroup --vm $vmName This checks if the specified virtual machine is already protected by the backup vault. 1. Enable VM Protection if Not Already Protected: if [ $retVal -eq 0 ]; then echo "Virtual machine is protected Already" else echo "Virtual machine is not protected" echo "Creating Virtual machine Protection..." az backup protection enable-for-vm \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --vm $vmName \ --policy-name DefaultPolicy fi If the VM is not protected, it enables backup protection for the VM with the default policy. 1. Initiate Backup Job: retention=`date +'%d-%m-%Y' -d "+1 year"` count=$(az backup job list --resource-group $resourceGroup --vault-name $RecoveryServicesVault --output table | grep -i 'InProgress' | wc -l) if [ $count -gt 0 ]; then echo "Backup is InProgress, Unable to initiate backup as another backup operation is currently in progress." echo "Checking the status of backup jobs..." az backup job list \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --output table exit 0 else echo "Initiating backup job.." az backup protection backup-now \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --container-name $vmName \ --item-name $vmName \ --backup-management-type AzureIaaSVM \ --retain-until $retention fi * It defines a retention policy by calculating a date one year from now. * It checks if another backup job is in progress. If so, it displays the active jobs and exits. * If no jobs are in progress, it initiates a new backup job for the VM. 1. Check Backup Job Status: echo "Checking the status of backup jobs..." az backup job list \ --resource-group $resourceGroup \ --vault-name $RecoveryServicesVault \ --output table Finally, it retrieves and displays the status of all backup jobs associated with the vault. ## Summary This script automates the process of logging into Azure, checking or creating a backup vault, managing the backup protection of a specified VM, and initiating a backup job, while also checking for existing operations to avoid conflicts.
forem.com
March 31, 2025 at 8:44 PM
Celebrate success with this "We Struck Oil" tee, featuring the Yellowstone Resource Group. A unique design for fans or collectors. 🛢️🏞️💰
👉 serenashirt.com
#Yellowstone #ResourceGroup #Oil #Success #UniqueTee
We struck oil Yellowstone resource group shirt, hoodie, sweatshirt and tank top
MOTHER'S DAY. Use Code "LOVEMOM" for The We struck oil Yellowstone resource group shirt, hoodie and sweater available in many styles. Hot Deal ends soon!
serenashirt.com
April 27, 2025 at 9:08 AM
🚀Move #Azure Resources to another #ResourceGroup
bit.ly/3vwq0Mg
March 28, 2024 at 2:03 PM
Lots of MCP parsing (which Kyverno helps with) in order to check the MCP method, caller tool name, etc.

Unmarshal the resourceKind, apiVersion, resourceGroup, etc., and then this is where the real authorization happens.
March 24, 2026 at 11:03 AM
It includes child resources but it only works for a resourceGroup, it is terribly slow and exports a template, meaning I have to parse it and filter the resources I'm interested in which results in more code and worse performance than I have now.
November 30, 2024 at 2:35 PM
A simple KQL query to identify all storage accounts that don't have TLS 1.2:

Resources
| where type == "http://microsoft.storage/storageaccounts" and properties.minimumTlsVersion != "TLS1_2"
| project name, location, resourceGroup, subscriptionId, properties.minimumTlsVersion
August 1, 2024 at 11:04 AM
This is very thoughtfully done, and I really like being able to have a verification check even for things that were deployed some other way ( #Bicep ). The "reconcile-policy: skip" annotation means that it's just verifying that the resource is there, not creating or changing it.
April 16, 2025 at 3:56 PM