git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/AzureHelpers/Public/List-AzGroups.ps1
diff options
context:
space:
mode:
authormail_redacted_for_web 2025-07-24 14:49:27 +0200
committermail_redacted_for_web 2025-07-24 14:49:27 +0200
commit1b082205f1e98a084695b042adec5cc122ff7717 (patch)
treeddfc10de4f5a9f7b6732ae98d6d52cf72769f58e /AzureHelpers/Public/List-AzGroups.ps1
downloadazure-helpers-1b082205f1e98a084695b042adec5cc122ff7717.tar.bz2
InComm, rather spontaneous
Diffstat (limited to 'AzureHelpers/Public/List-AzGroups.ps1')
-rw-r--r--AzureHelpers/Public/List-AzGroups.ps123
1 files changed, 23 insertions, 0 deletions
diff --git a/AzureHelpers/Public/List-AzGroups.ps1 b/AzureHelpers/Public/List-AzGroups.ps1
new file mode 100644
index 0000000..a280388
--- /dev/null
+++ b/AzureHelpers/Public/List-AzGroups.ps1
@@ -0,0 +1,23 @@
+function List-AzGroups {
+ <#
+ .SYNOPSIS
+ List all resource groups inside the Azure subscription we are logged into.
+
+ .DESCRIPTION
+ This simply uses `az group list` with a few parameters. Main purpose: coloured
+ and terse output.
+
+ .INPUTS
+ None. (Also, no parameters.)
+
+ .OUTPUTS
+ String. A coloured JSON output showing a more or less terse list of VMs.
+ #>
+ [Alias(
+ 'azgrouplist',
+ 'azrgl'
+ )]
+ Param (
+ )
+ az group list -o jsonc --query '[].{id: id, location: location, managedBy: managedBy, properties: properties, tags: tags}'
+} \ No newline at end of file