Edit

Share via


New-AzSearchService

Creates an Azure Cognitive Search service.

Syntax

Default (Default)

New-AzSearchService
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-Sku] <PSSkuName>
    [-Location] <String>
    [-PartitionCount <Int32>]
    [-ReplicaCount <Int32>]
    [-HostingMode <PSHostingMode>]
    [-PublicNetworkAccess <PSPublicNetworkAccess>]
    [-IdentityType <PSIdentityType>]
    [-IPRuleList <PSIpRule[]>]
    [-DisableLocalAuth <Boolean>]
    [-AuthOption <PSAuthOptionName>]
    [-AadAuthFailureMode <PSAadAuthFailureMode>]
    [-SemanticSearchMode <PSSemanticSearchMode>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-AzSearchService cmdlet creates an Azure Cognitive Search service with specified parameters.

Examples

Example 1

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

The command creates an Azure Cognitive Search service.

Parameters

-AadAuthFailureMode

(Optional) What status code to return when failing AAD authentication, if both api key and AAD authentication are allowed for the Azure Cognitive 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

-AuthOption

(Optional) Whether to only allow API key authentication or both API key authentication and AAD authentication for the Azure Cognitive 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

-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

-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 Cognitive 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

-HostingMode

Azure Cognitive Search Service hosting mode.

Parameter properties

Type:

Nullable<T>[PSHostingMode]

Default value:None
Accepted values:Default, HighDensity
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 Cognitive Search Service Identity (None/SystemAssigned)

Parameter properties

Type:

Nullable<T>[PSIdentityType]

Default value:None
Accepted values:None, SystemAssigned
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

-IPRuleList

(Optional) Azure Cognitive 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

-Location

Azure Cognitive Search Service location.

Parameter properties

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

Parameter sets

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

-Name

Azure Cognitive Search Service name.

Parameter properties

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

Parameter sets

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

-PartitionCount

Azure Cognitive 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 Cognitive Search Service public network access (Enabled/Disabled)

Parameter properties

Type:

Nullable<T>[PSPublicNetworkAccess]

Default value:None
Accepted values:Enabled, Disabled
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

Azure Cognitive 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

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

-SemanticSearchMode

(Optional) Option to control the availability of semantic search. This configuration is only possible for certain Azure Cognitive Search SKUs in certain locations

Parameter properties

Type:

Nullable<T>[PSSemanticSearchMode]

Default value:None
Accepted values:Disabled, 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

-Sku

Azure Cognitive Search Service Sku.

Parameter properties

Type:PSSkuName
Default value:None
Accepted values:Free, Basic, Standard, Standard2, Standard3, Storage_Optimized_L1, Storage_Optimized_L2
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
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

None

Outputs

PSSearchService