external help file | Module Name | online version | schema |
---|---|---|---|
scope-help.xml |
scope |
2.0.0 |
Filters a list of objects based on resource group identifiers.
Get-WAFResourceGroupsByList [-ObjectList] <Array> [-FilterList] <Array> [-KeyColumn] <String>
[-ProgressAction <ActionPreference>] [<CommonParameters>]
The Get-WAFResourceGroupsByList function takes a list of objects and filters them based on the specified resource group identifiers. It compares the first five segments of the KeyColumn property of each object with the provided filter list.
$objectList = @(
@{ Id = "/subscriptions/12345/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" },
@{ Id = "/subscriptions/12345/resourceGroups/anotherResourceGroup/providers/Microsoft.Compute/virtualMachines/anotherVM" }
)
$filterList = @("/subscriptions/12345/resourceGroups/myResourceGroup")
$filteredObjects = Get-WAFResourceGroupsByList -ObjectList $objectList -FilterList $filterList -KeyColumn "Id"
An array of objects to be filtered.
Type: Array
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An array of resource group identifiers to filter the objects.
Type: Array
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of the property in the objects that contains the resource group identifier.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
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.
Author: Kyle Poineal Date: 2024-08-07