New-AzSpatialAnchorsAccountKey

Regenerate key of Spatial Anchors Account

Syntax

New-AzSpatialAnchorsAccountKey
   -ResourceGroupName <String>
   -Name <String>
   [-Primary]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSpatialAnchorsAccountKey
   -ResourceGroupName <String>
   -Name <String>
   [-Secondary]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSpatialAnchorsAccountKey
   -ResourceId <String>
   [-Primary]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSpatialAnchorsAccountKey
   -ResourceId <String>
   [-Secondary]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSpatialAnchorsAccountKey
   -InputObject <PSSpatialAnchorsAccount>
   -Primary
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSpatialAnchorsAccountKey
   -InputObject <PSSpatialAnchorsAccount>
   -Secondary
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Regenerate primary key or secondary key of Spatial Anchors Account.

Examples

Example 1

PS C:\> New-AzSpatialAnchorsAccountKey -ResourceGroupName rg1 -Name example -Secondary

PrimaryKey                                   SecondaryKey
----------                                   ------------
QTwT6LpnD6NuUfgfkCKFBmf89xWJ7tDC0Yx0yxxaejs= mF8lsBeEbs51H/jLe4COW4zUiEyg9lDM1XHQ03jtxZU=

Regenerate secondary key of Spatial Anchors Account "example" in Resource Group "rg1".

Example 2

PS C:\> Get-AzSpatialAnchorsAccount -ResourceGroup rg1 -Name example | New-AzSpatialAnchorsAccountKey -Secondary

PrimaryKey                                   SecondaryKey
----------                                   ------------
QTwT6LpnD6NuUfgfkCKFBmf89xWJ7tDC0Yx0yxxaejs= BGOP2NZN5ThHbDFKzW+FISSgxnnBqCPKpTsixAxkvXk=

Regenerate secondary key of Spatial Anchors Account "example" from current Subscription and Resource Group "rg1" with piping.

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:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

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

The custom domain object.

Type:PSSpatialAnchorsAccount
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Name

Spatial Anchors Account Name.

Type:String
Aliases:SpatialAnchorsAccountName, AccountName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Primary

Regenerate primary key of Spatial Anchors Account.

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

Resource Group Name.

Type:String
Aliases:ResourceGroup
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceId

Resource ID of Spatial Anchors Account.

Type:String
Aliases:Id
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Secondary

Regenerate primary key of Spatial Anchors Account.

Type:SwitchParameter
Position:Named
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

String

Microsoft.Azure.Commands.MixedReality.SpatialAnchorsAccount.PSSpatialAnchorsAccount

Outputs

Microsoft.Azure.Commands.MixedReality.SpatialAnchorsAccount.PSAccountKeys