編集

次の方法で共有


New-AzProximityPlacementGroup

Create Proximity Placement Group resource.

Syntax

New-AzProximityPlacementGroup
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [-ProximityPlacementGroupType <String>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-Zone <String[]>]
   [-IntentVMSizeList <String[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

This cmdlet will create Proximity Placement Group resource.

Examples

Example 1

New-AzProximityPlacementGroup -ResourceGroupName $resourceGroupName -Name $proximityPlacementGroupName -Location $location -Tag @{key1 = "val1"}

ResourceGroupName           : rg0
ProximityPlacementGroupType : Standard
Id                          : /subscriptions/5393f919-a68a-43d0-9063-4b2bda6bffdf/resourceGroups/rg0/providers/Microsoft.Compute/proximityPlacementGroups/ppg0
Name                        : ppg0
Type                        : Microsoft.Compute/proximityPlacementGroups
Location                    : westcentralus
Tags                        : {"key1":"val1"}

This command creates a proximity place group in the given location.

Example 2

Create Proximity Placement Group resource. (autogenerated)

New-AzProximityPlacementGroup -Location westus -Name 'AgentPool01' -ProximityPlacementGroupType <String> -ResourceGroupName myresourcegroup

Example 3

$ResourceGroupName = <Resource Group Name>
$PPGName = <PPG Name>
$Location = <Azure Region>
# Use the VM Sizes and Zone that you want to use for the Zone and IntentVMSizeList parameters. 
New-AzProximityPlacementGroup -ResourceGroupName $ResourceGroupName -Name $PPGName -Location $Location -Zone '1' -IntentVMSizeList 'Standard_D4d_v4', 'Standard_D4d_v5';
$ppg = Get-AzProximityPlacementGroup -ResourceGroupName $ResourceGroupName -Name $PPGName;

# View the new values at $ppg.Intent.VmSizes[0], $ppg.Intent.VmSizes[1], and $ppg.Zones[0].

Parameters

-AsJob

Run cmdlet in the background

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

-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 credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IntentVMSizeList

Specifies possible sizes of virtual machines that can be created in the proximity placement group.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Location

Resource location

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the proximity placement group.

Type:String
Aliases:ProximityPlacementGroupName
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ProximityPlacementGroupType

Specifies the type of the proximity placement group. Possible values are: Standard or Ultra

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

-ResourceGroupName

The name of the resource group.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Tag

Resource tags

Type:Hashtable
Position:Named
Default value:None
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

-Zone

Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Outputs

PSProximityPlacementGroup