New-AzVpnSite
创建新的 Azure VpnSite 资源。 这是上传到 Azure 的客户分支的 RM 表示形式,用于与 Cortex 虚拟中心建立 S2S 连接。
语法
ByVirtualWanNameByVpnSiteIpAddress (默认值)
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWanResourceGroupName <String>
-VirtualWanName <String>
-IpAddress <String>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-IsSecuritySite]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByVirtualWanNameByVpnSiteLinkObject
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWanResourceGroupName <String>
-VirtualWanName <String>
-VpnSiteLink <PSVpnSiteLink[]>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-IsSecuritySite]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByVirtualWanObjectByVpnSiteIpAddress
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWan <PSVirtualWan>
-IpAddress <String>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-IsSecuritySite]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByVirtualWanObjectByVpnSiteLinkObject
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWan <PSVirtualWan>
-VpnSiteLink <PSVpnSiteLink[]>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-IsSecuritySite]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByVirtualWanResourceIdByVpnSiteIpAddress
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWanId <String>
-IpAddress <String>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-IsSecuritySite]
[-LinkSpeedInMbps <UInt32>]
[-BgpAsn <UInt32>]
[-BgpPeeringAddress <String>]
[-BgpPeeringWeight <UInt32>]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByVirtualWanResourceIdByVpnSiteLinkObject
New-AzVpnSite
-ResourceGroupName <String>
-Name <String>
-Location <String>
-VirtualWanId <String>
-VpnSiteLink <PSVpnSiteLink[]>
[-AddressSpace <String[]>]
[-DeviceModel <String>]
[-DeviceVendor <String>]
[-IsSecuritySite]
[-O365Policy <PSO365PolicyProperties>]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
创建新的 Azure VpnSite 资源。 这是上传到 Azure 的客户分支的 RM 表示形式,用于与 Cortex 虚拟中心建立 S2S 连接。
示例
示例 1
New-AzResourceGroup -Location "East US" -Name "nonlinkSite"
$virtualWan = New-AzVirtualWan -ResourceGroupName "nonlinkSite" -Name myVirtualWAN -Location "East US"
$vpnSiteAddressSpaces = New-Object string[] 2
$vpnSiteAddressSpaces[0] = "192.168.2.0/24"
$vpnSiteAddressSpaces[1] = "192.168.3.0/24"
New-AzVpnSite -ResourceGroupName "nonlinkSite" -Name "testVpnSite" -Location "East US" -VirtualWan $virtualWan -IpAddress "1.2.3.4" -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -LinkSpeedInMbps "10"
ResourceGroupName : nonlinkSite
Name : testVpnSite
Id : /subscriptions/{subscriptionId}/resourceGroups/nonlinkSite/providers/Microsoft.Network/vpnSites/testVpnSite
Location : eastus2euap
IpAddress : 1.2.3.4
VirtualWan : /subscriptions/{subscriptionId}/resourceGroups/nonlinkSite/providers/Microsoft.Network/virtualWans/myVirtualWAN
AddressSpace : {192.168.2.0/24, 192.168.3.0/24}
BgpSettings :
Type : Microsoft.Network/vpnSites
ProvisioningState : Succeeded
上述内容将在 Azure 的“nonlinkSite”资源组中创建位于美国东部的资源组虚拟 WAN。
然后,它会创建一个 VpnSite 来表示客户分支并将其链接到虚拟 WAN。
然后,可以使用此分支和 VpnGateway 使用 New-AzVpnConnection 命令设置 IPSec 连接。
示例 2
New-AzResourceGroup -Location "East US" -Name "multilink"
$virtualWan = New-AzVirtualWan -ResourceGroupName multilink -Name myVirtualWAN -Location "East US"
$vpnSiteAddressSpaces = New-Object string[] 2
$vpnSiteAddressSpaces[0] = "192.168.2.0/24"
$vpnSiteAddressSpaces[1] = "192.168.3.0/24"
$vpnSiteLink = New-AzVpnSiteLink -Name "testVpnSiteLink1" -IpAddress "15.25.35.45" -LinkProviderName "SomeTelecomProvider" -LinkSpeedInMbps "10"
$vpnSiteLink2 = New-AzVpnSiteLink -Name "testVpnSiteLink2" -IpAddress "15.25.35.55" -LinkProviderName "SomeTelecomProvider2" -LinkSpeedInMbps "100"
$vpnSite = New-AzVpnSite -ResourceGroupName "multilink" -Name "testVpnSite" -Location "East US" -VirtualWan $virtualWan -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -VpnSiteLink @($vpnSiteLink1, $vpnSiteLink2)
上述内容将在 Azure 的“多链接”资源组中创建资源组、虚拟 WAN 和位于美国东部的 1 个 VpnSiteLinks 的 VpnSite。
示例 3
创建新的 Azure VpnSite 资源。 (autogenerated)
New-AzVpnSite -AddressSpace <String[]> -DeviceModel 'SomeDevice' -DeviceVendor 'SomeDeviceVendor' -IpAddress '1.2.3.4' -LinkSpeedInMbps '10' -Location 'East US' -Name 'testVpnSite' -ResourceGroupName 'multilink' -VirtualWanName <String> -VirtualWanResourceGroupName <String>
参数
-AddressSpace
虚拟网络的地址前缀。
参数属性
| 类型: | String[]
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-AsJob
在后台运行 cmdlet
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-BgpAsn
此 VpnSite 的 BGP ASN。
参数属性
| 类型: | UInt32
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByVirtualWanNameByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanObjectByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanResourceIdByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-BgpPeeringAddress
此 VpnSite 的 BGP 对等互连地址。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByVirtualWanNameByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanObjectByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanResourceIdByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-BgpPeeringWeight
此 VpnSite 的 BGP 对等互连权重。
参数属性
| 类型: | UInt32
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByVirtualWanNameByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanObjectByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanResourceIdByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DeviceModel
远程 VPN 设备的设备模型。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DeviceVendor
远程 VPN 设备的设备供应商。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-IpAddress
此 VpnSite 的 IPAddress。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByVirtualWanNameByVpnSiteIpAddress
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanObjectByVpnSiteIpAddress
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanResourceIdByVpnSiteIpAddress
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-IsSecuritySite
如果 vpn 站点是安全站点,则为
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-LinkSpeedInMbps
远程 VPN 设备的设备模型。
参数属性
| 类型: | UInt32
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByVirtualWanNameByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanObjectByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanResourceIdByVpnSiteIpAddress
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Location
资源位置。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Name
资源名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | 资源名称, VpnSiteName |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-O365Policy
此 VpnSite 的 Office 365 流量中断策略。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ResourceGroupName
资源名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Tag
表示资源标记的哈希表。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-VirtualWan
此 VpnSite 需要连接到的 VirtualWan。
参数属性
参数集
ByVirtualWanObjectByVpnSiteIpAddress
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanObjectByVpnSiteLinkObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-VirtualWanId
此 VpnSite 需要连接到 ResourceId VirtualWan。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByVirtualWanResourceIdByVpnSiteIpAddress
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanResourceIdByVpnSiteLinkObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-VirtualWanName
此 VpnSite 需要连接到的 VirtualWan 的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByVirtualWanNameByVpnSiteIpAddress
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanNameByVpnSiteLinkObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-VirtualWanResourceGroupName
此 VpnSite 需要连接到的 VirtualWan 的资源组名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByVirtualWanNameByVpnSiteIpAddress
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanNameByVpnSiteLinkObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-VpnSiteLink
此 VpnSite 具有的 VpnSiteLinks 列表。
参数属性
参数集
ByVirtualWanNameByVpnSiteLinkObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanObjectByVpnSiteLinkObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
ByVirtualWanResourceIdByVpnSiteLinkObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
None
输出