Set-AzBastion
Hiermee wordt de Bastion-resource bijgewerkt.
Syntaxis
Set-AzBastion
-InputObject <PSBastion>
[-Sku <String>]
[-ScaleUnit <Int32>]
[-EnableKerberos <Boolean>]
[-DisableCopyPaste <Boolean>]
[-EnableTunneling <Boolean>]
[-EnableIpConnect <Boolean>]
[-EnableShareableLink <Boolean>]
[-EnableSessionRecording <Boolean>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
De set-AzBastion-cmdlet kan worden gebruikt om de SKU, schaaleenheden of tags van een bestaande BastionHost-resource bij te werken.
Voorbeelden
Voorbeeld 1
Set-AzBastion -InputObject $bastionObj -Sku "Standard" -ScaleUnit 10 -Force
Name : MyBastion
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/bastionHosts/MyBastion
Etag : W/"000"
Type : Microsoft.Network/bastionHosts
Location : westus2
Tag :
TagsTable :
ResourceGroupName : MyRg
DnsName : bst-00000000-0000-0000-0000-000000000001.test.bastion.azure.com
ResourceGuid :
ProvisioningState : Succeeded
IpConfigurationsText : [
{
"Subnet": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/AzureBastionSubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/publicIPAddresses/PublicIp1"
},
"ProvisioningState": "Succeeded",
"PrivateIpAllocationMethod": "Dynamic",
"Name": "IpConf",
"Etag": "W/\"000\"",
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/bastionHosts/MyBastion/bastionHostIpConfigurations/IpConf"
}
]
Sku : {
"Name": "Standard"
}
Scale Units : 10
Werkt BastionHost-resource bij met Basic SKU en 2 schaaleenheden naar standard-SKU en 10 schaaleenheden
Voorbeeld 2
$bastionObj = Get-AzBastion -ResourceGroupName "MyRg" -Name "MyBastion"
$bastionObj
Name : MyBastion
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/bastionHosts/MyBastion
Etag : W/"000"
Type : Microsoft.Network/bastionHosts
Location : westus2
Tag :
TagsTable :
ResourceGroupName : MyRg
DnsName : bst-00000000-0000-0000-0000-000000000001.test.bastion.azure.com
ResourceGuid :
ProvisioningState : Succeeded
IpConfigurationsText : [
{
"Subnet": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/AzureBastionSubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/publicIPAddresses/PublicIp1"
},
"ProvisioningState": "Succeeded",
"PrivateIpAllocationMethod": "Dynamic",
"Name": "IpConf",
"Etag": "W/\"000\"",
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/bastionHosts/MyBastion/bastionHostIpConfigurations/IpConf"
}
]
Sku : {
"Name": "Basic"
}
Scale Units : 2
$bastionObj.Sku.Name = "Standard"
$bastionObj.ScaleUnit = 50
Set-AzBastion -InputObject $bastionObj -Force
Name : MyBastion
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/bastionHosts/MyBastion
Etag : W/"000"
Type : Microsoft.Network/bastionHosts
Location : westus2
Tag :
TagsTable :
ResourceGroupName : MyRg
DnsName : bst-00000000-0000-0000-0000-000000000001.test.bastion.azure.com
ResourceGuid :
ProvisioningState : Succeeded
IpConfigurationsText : [
{
"Subnet": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/AzureBastionSubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/publicIPAddresses/PublicIp1"
},
"ProvisioningState": "Succeeded",
"PrivateIpAllocationMethod": "Dynamic",
"Name": "IpConf",
"Etag": "W/\"000\"",
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRg/providers/Microsoft.Network/bastionHosts/MyBastion/bastionHostIpConfigurations/IpConf"
}
]
Sku : {
"Name": "Standard"
}
Scale Units : 50
Werkt BastionHost-resource bij met Basic SKU en 2 schaaleenheden naar standard-SKU en 50 schaaleenheden
Parameters
-AsJob
Cmdlet op de achtergrond uitvoeren
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-Confirm
Hiermee wordt u gevraagd om bevestiging voordat u de cmdlet uitvoert.
Type: | SwitchParameter |
Aliassen: | cf |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DefaultProfile
De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.
Type: | IAzureContextContainer |
Aliassen: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DisableCopyPaste
Kopiƫren en plakken
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | False |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-EnableIpConnect
IP-verbinding maken
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | False |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-EnableKerberos
Kerberos
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | False |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-EnableSessionRecording
Sessieopname
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-EnableShareableLink
Deelbare koppeling
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | False |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-EnableTunneling
Systeemeigen client
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | False |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-Force
Vraag om bevestiging als u een resource wilt overschrijven
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-InputObject
Het BastionHost-object
Type: | PSBastion |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-ScaleUnit
De Bastion-schaaleenheden
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | 2 |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-Sku
De Bastion-SKU-laag
Type: | String |
Geaccepteerde waarden: | Basic, Standard, Premium |
Position: | Named |
Default value: | Basic |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-Tag
Een hashtabel die resourcetags vertegenwoordigt.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-WhatIf
Hiermee wordt weergegeven wat er zou gebeuren als u de cmdlet uitvoert. De cmdlet wordt niet uitgevoerd.
Type: | SwitchParameter |
Aliassen: | wi |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Invoerwaarden
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]]