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

Test-AzureName
    [-Service]
    -Name <String>
    [-Profile <AzureSMProfile>]
    [<CommonParameters>]
Test-AzureName
    [-Storage]
    -Name <String>
    [-Profile <AzureSMProfile>]
    [<CommonParameters>]
Test-AzureName
    [-ServiceBusNamespace]
    -Name <String>
    [-Profile <AzureSMProfile>]
    [<CommonParameters>]
Test-AzureName
    [-Website]
    -Name <String>
    [-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.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters: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.

Type:AzureSMProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Service

Specifies to test for an existing service account.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ServiceBusNamespace

Specifies to test for an existing service bus namespace.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Storage

Specifies to test for an existing storage account.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Website

Specifies to test for an existing website.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Notes

  • node-dev, php-dev, python-dev