Test-AzureName
Tests whether a Microsoft Azure cloud service name, storage service name or service bus namespace name exists or not.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
Service
Test-AzureName
-Name <String>
[-Service]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Storage
Test-AzureName
-Name <String>
[-Storage]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
ServiceBusNamespace
Test-AzureName
-Name <String>
[-ServiceBusNamespace]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Website
Test-AzureName
-Name <String>
[-Website]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
If the name exists, the cmdlet returns $True. If the name does not exist, it returns $False.
Examples
Example 1
PS C:\> Test-AzureName -Service "MyNameService1"
This command tests to see if the "MyNameService1" is an existing Microsoft Azure cloud service name.
Example 2
PS C:\> Test-AzureName -Storage "mystorename1"
This command tests to see if the "mystorename1" is an existing Microsoft Azure storage service name.
Example 3
PS C:\> Test-AzureName -ServiceBusNamespace "mynamespace"
This command tests to see if the "mynamespace" is an existing Microsoft Azure service bus namespace name.
Parameters
-Name
Specifies the name of the service or storage account to test.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Profile
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Parameter properties
Type: | AzureSMProfile |
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 |
-Service
Specifies to test for an existing service account.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Service
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ServiceBusNamespace
Specifies to test for an existing service bus namespace.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ServiceBusNamespace
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Storage
Specifies to test for an existing storage account.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Storage
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Website
Specifies to test for an existing website.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Website
Position: | Named |
Mandatory: | True |
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.
Notes
- node-dev, php-dev, python-dev