Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 1.95 KB

Get-WAFTaggedResource.md

File metadata and controls

89 lines (67 loc) · 1.95 KB
external help file Module Name online version schema
collector-help.xml
collector
2.0.0

Get-WAFTaggedResource

SYNOPSIS

Retrieves all resources with matching tags.

SYNTAX

Get-WAFTaggedResource [-TagArray] <String[]> [-SubscriptionIds] <String[]> [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

The Get-WAFTaggedResources function queries Azure Resource Graph to retrieve all resources that have matching tags.

EXAMPLES

EXAMPLE 1

$taggedResources = Get-WAFTaggedResources -tagArray @('env==prod', 'app==myapp') -SubscriptionIds @('sub1', 'sub2')

PARAMETERS

-TagArray

An array of tags to filter resources by. Each tag should be in the format 'key==value'.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionIds

An array of subscription IDs to scope the query.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

Returns an array of resources with matching tags.

NOTES

This function uses the Invoke-WAFQuery function to perform the query.

RELATED LINKS