New-​Azure​Affinity​Group

Creates an affinity group in the current subscription.

Syntax

New-AzureAffinityGroup
   [-Name] <String>
   [-Description <String>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Label <String>]
   -Location <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The New-AzureAffinityGroup cmdlet creates an Azure affinity group in the current Azure subscription.

An affinity group puts your services and their resources together in an Azure datacenter. The affinity group groups members together for optimal performance. Define affinity groups at the subscription level. Your affinity groups are available to any subsequent cloud services or storage accounts that you create. You can add services to an affinity group only when you create it.

Examples

Example 1: Create an affinity group

PS C:\> New-AzureAffinityGroup -Name "South01" -Location "South Central US" -Label "South Region" -Description "Affinity group for production applications in southern region."

This command creates an affinity group named South01 in the South Central US region. The command specifies a label and a description.

Required Parameters

-Location

Specifies the geographical location of the Azure datacenter where this cmdlet creates the affinity group.

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

Specifies a name for the affinity group. The name must be unique to the subscription.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Description

Specifies a description for the affinity group. The description may be up to 1024 characters long.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

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

Specifies a label for the affinity group. The label may be up to 100 characters long.

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