Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-AzureNetworkSecurityGroupAssociation

Set-AzureNetworkSecurityGroupAssociation

microsoft.windowsazure.commands.servicemanagement.network.dll

Synopsis

Associates the NSG to the VM, role or NIC Set-AzureNetworkSecurityGroupAssociation [-Name] <string> [-VirtualNetworkName] <string> [-SubnetName] <string> [-Force] [-PassThru] [-Profile <AzureProfile>] [<CommonParameters>] Set-AzureNetworkSecurityGroupAssociation [-Name] <string> [-VM] <PersistentVMRoleContext> [[-NetworkInterfaceName] <string>] -ServiceName <string> [-Force] [-PassThru] [-Profile <AzureProfile>] [<CommonParameters>] Set-AzureNetworkSecurityGroupAssociation [-Name] <string> [-ServiceName] <string> [[-Slot] <string>] [-RoleName] <string> [[-NetworkInterfaceName] <string>] [-Force] [-PassThru] [-Profile <AzureProfile>] [<CommonParameters>]

Syntax

Set-AzureNetworkSecurityGroupAssociation [-Name] [-ServiceName] [-VM] [-NetworkInterfaceName] [-Force] [-PassThru] [-PipelineVariable] [-Profile] [<CommonParameters>]

Set-AzureNetworkSecurityGroupAssociation [-Name] [-Slot] [-RoleName] [-Force] [-PassThru] [-PipelineVariable] [-Profile] [<CommonParameters>]

Set-AzureNetworkSecurityGroupAssociation [-Name] [-VirtualNetworkName] [-SubnetName] [-Force] [-PassThru] [-PipelineVariable] [-Profile] [<CommonParameters>]

Detailed Description

Associates the NSG to the VM, role or NIC

Parameters

-Force <SwitchParameter>

skips the confirmation prompt

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Name <string>

Name of the NSG to be set

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-NetworkInterfaceName <string>

Name of the NIC to which the NSG to be applied

Aliases

None

Required?

false

Position

5

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PipelineVariable <string>

Not Specified

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Profile <AzureProfile>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-RoleName <string>

[PaaS] Name of the role to which the NSG to be applied

Aliases

None

Required?

true

Position

4

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ServiceName <string>

Name of the cloud service

Aliases

None

Required?

true

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Slot <string>

[PaaS] Optional values are 'Production' and 'Staging'. Default value is 'Production'

Aliases

None

Required?

false

Position

3

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-SubnetName <string>

Name of the subnet to which the NSG is associated

Aliases

None

Required?

true

Position

3

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-VirtualNetworkName <string>

Name of the Virtual Network

Aliases

None

Required?

true

Position

2

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-VM <PersistentVMRoleContext>

Virtual machine to which the NSG is applied

Aliases

None

Required?

true

Position

2

Default value

None

Accept pipeline input?

true (ByValue, ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type

System.Boolean

Notes

Examples

-------------------------- EXAMPLE 1 --------------------------

C:\PS>

Description

-----------

Associates the NSG to the Virtual machine be1

          Get-AzureVM -ServiceName be1 -Name be1 | Set-AzureNetworkSecurityGroupAssociation -Name bensg