Edit

Set-AzSearchService

Update an Azure AI Search service.

Syntax

ResourceNameParameterSet (Default)

Set-AzSearchService
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-PartitionCount <Int32>]
    [-ReplicaCount <Int32>]
    [-PublicNetworkAccess <PSPublicNetworkAccess>]
    [-IdentityType <PSIdentityType>]
    [-IPRuleList <PSIpRule[]>]
    [-DisableLocalAuth <Boolean>]
    [-AuthOption <PSAuthOptionName>]
    [-AadAuthFailureMode <PSAadAuthFailureMode>]
    [-KnowledgeRetrievalMode <PSKnowledgeRetrievalMode>]
    [-DataExfiltrationProtectionList <PSDataExfiltrationProtection[]>]
    [-Bypass <PSSearchBypass>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

InputObjectParameterSet

Set-AzSearchService
    [-InputObject] <PSSearchService>
    [-PartitionCount <Int32>]
    [-ReplicaCount <Int32>]
    [-PublicNetworkAccess <PSPublicNetworkAccess>]
    [-IdentityType <PSIdentityType>]
    [-IPRuleList <PSIpRule[]>]
    [-DisableLocalAuth <Boolean>]
    [-AuthOption <PSAuthOptionName>]
    [-AadAuthFailureMode <PSAadAuthFailureMode>]
    [-KnowledgeRetrievalMode <PSKnowledgeRetrievalMode>]
    [-DataExfiltrationProtectionList <PSDataExfiltrationProtection[]>]
    [-Bypass <PSSearchBypass>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

ResourceIdParameterSet

Set-AzSearchService
    [-ResourceId] <String>
    [-PartitionCount <Int32>]
    [-ReplicaCount <Int32>]
    [-PublicNetworkAccess <PSPublicNetworkAccess>]
    [-IdentityType <PSIdentityType>]
    [-IPRuleList <PSIpRule[]>]
    [-DisableLocalAuth <Boolean>]
    [-AuthOption <PSAuthOptionName>]
    [-AadAuthFailureMode <PSAadAuthFailureMode>]
    [-KnowledgeRetrievalMode <PSKnowledgeRetrievalMode>]
    [-DataExfiltrationProtectionList <PSDataExfiltrationProtection[]>]
    [-Bypass <PSSearchBypass>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

Description

The Set-AzSearchService cmdlet modifies an Azure AI Search service.

Examples

Example 1

Set-AzSearchService -ResourceGroupName "TestAzureSearchPsGroup" -Name "pstestazuresearch01" -PartitionCount 2 -ReplicaCount 2
ResourceGroupName : TestAzureSearchPsGroup
Name              : pstestazuresearch01
Id                : /subscriptions/f9b96b36-1f5e-4021-8959-51527e26e6d3/resourceGroups/TestAzureSearchPsGroup/providers/Microsoft.Search/searchServices/pstestazuresearch01
Location          : West US
Sku               : Standard
ReplicaCount      : 2
PartitionCount    : 2
HostingMode       : Default
Tags              :

The example changes partition count and replica count of the Azure AI Search service to 2.

Example 2: Set the agentic retrieval billing plan

Set-AzSearchService -ResourceGroupName "TestAzureSearchPsGroup" -Name "pstestazuresearch01" -KnowledgeRetrievalMode Standard

The command selects the standard agentic retrieval billing plan for an existing Azure AI Search service. If KnowledgeRetrievalMode is omitted, the existing billing plan is preserved. Agentic retrieval availability depends on the service SKU and location.

Parameters

-AadAuthFailureMode

(Optional) What status code to return when failing AAD authentication, if both api key and AAD authentication are allowed for the Azure AI Search service

Parameter properties

Type:

Nullable<T>[PSAadAuthFailureMode]

Default value:None
Accepted values:Http403, Http401WithBearerChallenge
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AcquirePolicyToken

Acquire an Azure Policy token automatically for this resource operation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AuthOption

(Optional) Whether to only allow API key authentication or both API key authentication and AAD authentication for the Azure AI Search service

Parameter properties

Type:

Nullable<T>[PSAuthOptionName]

Default value:None
Accepted values:ApiKeyOnly, AadOrApiKey
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Bypass

(Optional) Possible origins of inbound traffic that can bypass the rules defined in the 'ipRules' section

Parameter properties

Type:

Nullable<T>[PSSearchBypass]

Default value:None
Accepted values:None, AzureServices
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ChangeReference

The change reference resource ID for this resource operation.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DataExfiltrationProtectionList

(Optional) A list of data exfiltration scenarios that are explicitly disallowed for the search service

Parameter properties

Type:

PSDataExfiltrationProtection[]

Default value:None
Accepted values:BlockAll
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisableLocalAuth

(Optional) Disable API key authentication for the Azure AI Search service (true/false/null)

Parameter properties

Type:

Nullable<T>[Boolean]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IdentityType

(Optional) Azure AI Search Service Identity (None/SystemAssigned)

Parameter properties

Type:

Nullable<T>[PSIdentityType]

Default value:None
Accepted values:None, SystemAssigned, UserAssigned, SystemAssignedUserAssigned
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Search Service Input Object.

Parameter properties

Type:PSSearchService
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputObjectParameterSet
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-IPRuleList

(Optional) Azure AI Search Service IP rules

Parameter properties

Type:

PSIpRule[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-KnowledgeRetrievalMode

(Optional) Billing plan for agentic retrieval (Free/Standard). This configuration is only available for certain Azure AI Search SKUs in certain locations.

Parameter properties

Type:

Nullable<T>[PSKnowledgeRetrievalMode]

Default value:None
Accepted values:Free, Standard
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Search Service name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ResourceNameParameterSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PartitionCount

Search Service partition count.

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PublicNetworkAccess

(Optional) Azure AI Search Service public network access (Enabled/Disabled)

Parameter properties

Type:

Nullable<T>[PSPublicNetworkAccess]

Default value:None
Accepted values:Enabled, Disabled, SecuredByPerimeter
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReplicaCount

Search Service replica count.

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

Resource Group name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ResourceNameParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

Search Service Resource Id.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ResourceIdParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Inputs

PSSearchService

String

Outputs

PSSearchService