external help file | Module Name | online version | schema |
---|---|---|---|
collector-help.xml |
collector |
2.0.0 |
Retrieves all resources with matching tags.
Get-WAFTaggedResource [-TagArray] <String[]> [-SubscriptionIds] <String[]> [-ProgressAction <ActionPreference>]
[<CommonParameters>]
The Get-WAFTaggedResources function queries Azure Resource Graph to retrieve all resources that have matching tags.
$taggedResources = Get-WAFTaggedResources -tagArray @('env==prod', 'app==myapp') -SubscriptionIds @('sub1', 'sub2')
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
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
{{ 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
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This function uses the Invoke-WAFQuery function to perform the query.