Remove-AzSearchQueryKey

Remove the query key from the Azure Cognitive Search service.

Syntax

Remove-AzSearchQueryKey
      [-ResourceGroupName] <String>
      [-ServiceName] <String>
      -KeyValue <String>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzSearchQueryKey
      [-ParentObject] <PSSearchService>
      -KeyValue <String>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzSearchQueryKey
      [-ParentResourceId] <String>
      -KeyValue <String>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AzSearchQueryKey cmdlet removes the query key from the Azure Cognitive Search service.

Examples

Example 1

PS C:\> Get-AzSearchQueryKey -ResourceGroupName "TestAzureSearchPsGroup" -ServiceName "pstestazuresearch01"

Name         Key                             
----         ---                             
             D260F448EA192EBC19D59F7E5670E8BB
NewQueryKey1 B4C13E3F6FA76100D3488673CFDCD438

PS C:\> Remove-AzSearchQueryKey -ResourceGroupName "TestAzureSearchPsGroup" -ServiceName "pstestazuresearch01" -KeyValue B4C13E3F6FA76100D3488673CFDCD438

Confirm
Are you sure you want to remove query key 'B4C13E3F6FA76100D3488673CFDCD438'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
PS C:\>

The example removes the query key from the Azure Cognitive Search service.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Do not ask for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-KeyValue

Azure Cognitive Search Service query key value.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ParentObject

Azure Cognitive Search Service Input Object.

Type:Microsoft.Azure.Commands.Management.Search.Models.PSSearchService
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ParentResourceId

Azure Cognitive Search Service Resource Id.

Type:String
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-PassThru

This Cmdlet does not return an object by default. If this switch is specified, it returns true if successful.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Resource Group name.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServiceName

Azure Cognitive Search Service name.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.Commands.Management.Search.Models.PSSearchService

String

Outputs

Boolean