編集

次の方法で共有


Add-AzVmssWinRMListener

Adds a WinRM listener to the VMSS.

Syntax

Add-AzVmssWinRMListener
   [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
   [[-Protocol] <ProtocolTypes>]
   [[-CertificateUrl] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Add-AzVmssWinRMListener cmdlet adds a Windows Remote Management (WinRM) listener on the Virtual Machine Scale Set (VMSS).

Examples

Example 1: Add a WinRM listener to the VMSS

$VMSS = New-AzVmssConfig
Add-AzVmssWinRMListener -VirtualMachineScaleSet $VMSS -Protocol Https -CertificateUrl "http://keyVaultName.vault.contoso.net/secrets/secretName/secretVersion"

This example adds a WinRM listener to the VMSS. The first command uses the New-AzVmssConfig cmdlet to create a VMSS configuration object and stores the result in the variable named $VMSS. The second command adds an HTTP protocol WinRM listener with the certificate at the specified URL to the VMSS.

Parameters

-CertificateUrl

Specifies a link, as a URL, of the certificate with which new virtual machines are provisioned.

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:True
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

-Protocol

Specifies the protocol of the WinRM listener. The acceptable values for this parameter are:

  • Http
  • Https
Type:Nullable<T>[ProtocolTypes]
Accepted values:Http, Https
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VirtualMachineScaleSet

Specifies the VMSS object. You can use the New-AzVmssConfig cmdlet to create the object.

Type:PSVirtualMachineScaleSet
Position:0
Default value:None
Required:True
Accept pipeline input:True
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

Inputs

PSVirtualMachineScaleSet

Nullable<T>[[Microsoft.Azure.Management.Compute.Models.ProtocolTypes, Microsoft.Azure.Management.Compute, Version=23.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]

String

Outputs

PSVirtualMachineScaleSet