Test-AzKeyVaultManagedHsmNameAvailability
Checks that the managed hsm name is valid and is not already in use.
Syntax
Test-AzKeyVaultManagedHsmNameAvailability
[-SubscriptionId <String>]
-Name <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Test-AzKeyVaultManagedHsmNameAvailability
[-SubscriptionId <String>]
-JsonFilePath <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Test-AzKeyVaultManagedHsmNameAvailability
[-SubscriptionId <String>]
-JsonString <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Checks that the managed hsm name is valid and is not already in use.
Examples
Example 1: Test the availability of an unused HSM name
Test-AzKeyVaultManagedHsmNameAvailability -Name testmhsm0818
Message NameAvailable Reason
------- ------------- ------
True
This commands tests the availability of vault name testmhsm0818
.
The results shows testmhsm0818
is not occupied.
Example 2: Test the availability of an used HSM name
Test-AzKeyVaultNameAvailability -Name testmhsm
Message NameAvailable Reason
------- ------------- ------
The name 'testmhsm' is already in use. False AlreadyExists
This commands tests the availability of HSM name testmhsm
.
The results shows testmhsm
is already in use.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JsonFilePath
Path of Json file supplied to the Check operation
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JsonString
Json string supplied to the Check operation
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The managed hsm name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Azure PowerShell