New-AzBastion
Erstellt eine Bastionressource.
Syntax
New-AzBastion
-ResourceGroupName <String>
-Name <String>
-PublicIpAddress <PSPublicIpAddress>
-VirtualNetwork <PSVirtualNetwork>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBastion
-ResourceGroupName <String>
-Name <String>
-PublicIpAddress <PSPublicIpAddress>
-VirtualNetworkRgName <String>
-VirtualNetworkName <String>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBastion
-ResourceGroupName <String>
-Name <String>
-PublicIpAddress <PSPublicIpAddress>
-VirtualNetworkId <String>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBastion
-ResourceGroupName <String>
-Name <String>
-PublicIpAddressId <String>
-VirtualNetwork <PSVirtualNetwork>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBastion
-ResourceGroupName <String>
-Name <String>
-PublicIpAddressId <String>
-VirtualNetworkRgName <String>
-VirtualNetworkName <String>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBastion
-ResourceGroupName <String>
-Name <String>
-PublicIpAddressId <String>
-VirtualNetworkId <String>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBastion
-ResourceGroupName <String>
-Name <String>
-PublicIpAddressRgName <String>
-PublicIpAddressName <String>
-VirtualNetwork <PSVirtualNetwork>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBastion
-ResourceGroupName <String>
-Name <String>
-PublicIpAddressRgName <String>
-PublicIpAddressName <String>
-VirtualNetworkRgName <String>
-VirtualNetworkName <String>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzBastion
-ResourceGroupName <String>
-Name <String>
-PublicIpAddressRgName <String>
-PublicIpAddressName <String>
-VirtualNetworkId <String>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Beschreibung
Erstellt eine Bastionressource. Dies benötigt eine öffentliche IP-Adresse und ein VirtualNetwork. In diesem VirtualNetwork muss ein Subnetz mit dem Namen AzureBastionSubnet vorhanden sein.Die pubic IP-Adresse muss mit Sku Standard erstellt werden.
Beispiele
Beispiel 1
$subnetName = "AzureBastionSubnet"
$subnet = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.0.0/24
$vnet = New-AzVirtualNetwork -Name "TestVnet" -ResourceGroupName "BastionPowershellTest" -Location "westeurope" -AddressPrefix 10.0.0.0/16 -Subnet $subnet
$publicip = New-AzPublicIpAddress -ResourceGroupName "BastionPowershellTest" -Name "Test-Ip" -location "westeurope" -AllocationMethod Dynamic -Sku Standard
$bastion = New-AzBastion -ResourceGroupName "BastionPowershellTest" -Name "test-Bastion2" -PublicIpAddress $publicip -VirtualNetwork $vnet
IpConfigurations : {IpConf}
DnsName : bst-a9ca868f-ddab-4a50-9f45-a443ea8a0187.bastion.azure.com
ProvisioningState : Succeeded
IpConfigurationsText : [
{
"Subnet": {
"Id": "/subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/virtualNetworks/TestVnet/subnets/AzureBastionSubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/publicIPAddresses/Test-Ip"
},
"ProvisioningState": "Succeeded",
"PrivateIpAllocationMethod": "Dynamic",
"Name": "IpConf",
"Etag": "W/\"ed810ccd-b3f6-4e22-891e-b0ed0a26d6dd\"",
"Id": "/subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/bastionHosts/test-Bastion2/bastionHostIpConfigurations/IpConf"
}
]
ResourceGroupName : BastionPowershellTest
Location : westeurope
ResourceGuid :
Type : Microsoft.Network/bastionHosts
Tag :
TagsTable :
Name : test-Bastion2
Etag : W/"ed810ccd-b3f6-4e22-891e-b0ed0a26d6dd"
Id : /subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/bastionHosts/test-Bastion2
Sku : {
"Name": "Basic"
}
Scale Units : 2
In diesem Beispiel wird eine Bastion erstellt, die an das virtuelle Netzwerk "vnet" in derselben Ressourcengruppe wie die Bastion angefügt ist. In diesem vnet muss ein Subnetz mit dem Namen AzureBastionSubnet vorhanden sein. Die IP-Adresse muss mit Sku Standard erstellt werden.
Beispiel 2
$vnet = Get-AzVirtualNetwork -ResourceGroupName "BastionPowershellTest" -Name "testVnet2"
Add-AzVirtualNetworkSubnetConfig -Name "AzureBastionSubnet" -VirtualNetwork $vnet -AddressPrefix "10.0.0.0/24"
$vnet| Set-AzVirtualNetwork
New-AzBastion -ResourceGroupName "BastionPowershellTest" -Name "testBastion2" -PublicIpAddressRgName "BastionPowershellTest" -PublicIpAddressName "testIp2" -VirtualNetworkRgName "BastionPowershellTest" -VirtualNetworkName "testVnet2"
IpConfigurations : {IpConf}
DnsName : bst-53757658-c4fd-4908-b1a7-0849e555d489.bastion.azure.com
ProvisioningState : Succeeded
IpConfigurationsText : [
{
"Name": "IpConf",
"Etag": "W/\"7460e5f6-ad41-438b-a595-a63346ed8f16\"",
"Id": "/subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/bastionHosts/testBastion2/bastionHostIpConfigurations/IpConf",
"Subnet": {
"Id": "/subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/virtualNetworks/testVnet2/subnets/AzureBastionSubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/publicIPAddresses/testIp2"
},
"ProvisioningState": "Succeeded",
"PrivateIpAllocationMethod": "Dynamic"
}
]
ResourceGroupName : BastionPowershellTest
Location : westeurope
ResourceGuid :
Type : Microsoft.Network/bastionHosts
Tag :
TagsTable :
Name : testBastion2
Etag : W/"7460e5f6-ad41-438b-a595-a63346ed8f16"
Id : /subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/bastionHosts/testBastion2
Sku : {
"Name": "Basic"
}
Scale Units : 2
Beispiel 3
$vnet = Get-AzVirtualNetwork -ResourceGroupName "BastionPowershellTest" -Name "testVnet2"
Add-AzVirtualNetworkSubnetConfig -Name "AzureBastionSubnet" -VirtualNetwork $vnet -AddressPrefix "10.0.0.0/24"
$vnet| Set-AzVirtualNetwork
New-AzBastion -ResourceGroupName "BastionPowershellTest" -Name "testBastion2" -PublicIpAddressRgName "BastionPowershellTest" -PublicIpAddressName "testIp2" -VirtualNetworkRgName "BastionPowershellTest" -VirtualNetworkName "testVnet2" -Sku "Standard" -ScaleUnit 3
IpConfigurations : {IpConf}
DnsName : bst-53757658-c4fd-4908-b1a7-0849e555d489.bastion.azure.com
ProvisioningState : Succeeded
IpConfigurationsText : [
{
"Name": "IpConf",
"Etag": "W/\"7460e5f6-ad41-438b-a595-a63346ed8f16\"",
"Id": "/subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/bastionHosts/testBastion2/bastionHostIpConfigurations/IpConf",
"Subnet": {
"Id": "/subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/virtualNetworks/testVnet2/subnets/AzureBastionSubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/publicIPAddresses/testIp2"
},
"ProvisioningState": "Succeeded",
"PrivateIpAllocationMethod": "Dynamic"
}
]
ResourceGroupName : BastionPowershellTest
Location : westeurope
ResourceGuid :
Type : Microsoft.Network/bastionHosts
Tag :
TagsTable :
Name : testBastion2
Etag : W/"7460e5f6-ad41-438b-a595-a63346ed8f16"
Id : /subscriptions/359a08a9-ff1b-463c-92d7-6df8d946f25c/resourceGroups/BastionPowershellTest/providers/Microsoft.Network/bastionHosts/testBastion2
Sku : {
"Name": "Standard"
}
Scale Units : 3
In diesem Beispiel wird eine BastionHost-Ressource mit Standard-Sku und 3 Skalierungseinheiten erstellt.
Parameter
-AsJob
Cmdlet im Hintergrund ausführen
Typ: | SwitchParameter |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.
Typ: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure
Typ: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableCopyPaste
Kopieren und Einfügen
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardwert: | False |
Erforderlich: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EnableIpConnect
IP-Verbinden
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardwert: | False |
Erforderlich: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EnableKerberos
Kerberos
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardwert: | False |
Erforderlich: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EnableShareableLink
Freigabefähiger Link
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardwert: | False |
Erforderlich: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EnableTunneling
Native Client
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardwert: | False |
Erforderlich: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Der Name der Bastionressource.
Typ: | String |
Aliases: | ResourceName, BastionName |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublicIpAddress
Das öffentliche IP-Adressobjekt für Bastion.
Typ: | PSPublicIpAddress |
Aliases: | PublicIpAddressObject |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublicIpAddressId
Die öffentliche IP-Adresse Azure-Ressourcen-ID für Bastion.
Typ: | String |
Aliases: | PublicIpAddressResourceId |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublicIpAddressName
Der Öffentliche IP-Adressressourcenname für Bastion.
Typ: | String |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublicIpAddressRgName
Der Name der öffentlichen IP-Adresse-Ressourcengruppe für Bastion.
Typ: | String |
Aliases: | PublicIpAddressResourceGroupName |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Der Ressourcengruppenname, in dem Sie Bastion erstellen müssen.
Typ: | String |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ScaleUnit
Die Skalierungseinheiten für BastionHost
Typ: | Nullable<T>[Int32] |
Position: | Named |
Standardwert: | 2 |
Erforderlich: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Sku
Die Bastion-Sku-Ebene
Typ: | String |
Zulässige Werte: | Basic, Standard |
Position: | Named |
Standardwert: | Basic |
Erforderlich: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
Eine Hashtabelle, die Ressourcentags darstellt.
Typ: | Hashtable |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualNetwork
Das virtuelle Netzwerkobjekt für Bastion.
Typ: | PSVirtualNetwork |
Aliases: | VirtualNetworkObject |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualNetworkId
Die Azure-Ressourcen-ID für das virtuelle Netzwerk für Bastion.
Typ: | String |
Aliases: | VirtualNetworkResourceId |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualNetworkName
Der Name der virtuellen Netzwerkressource für Bastion.
Typ: | String |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualNetworkRgName
Der Name der Ressourcengruppe für virtuelle Netzwerke für bastion.
Typ: | String |
Aliases: | VirtualNetworkResourceGroupName |
Position: | Named |
Standardwert: | None |
Erforderlich: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Typ: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Standardwert: | None |
Erforderlich: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Eingaben
Nullable<T>[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Nullable<T>[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]