Set-AzBastion
Uppdaterar Bastion-resursen.
Syntax
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
Cmdleten Set-AzBastion kan användas för att uppdatera SKU, skalningsenheter eller taggar för en befintlig BastionHost-resurs.
Exempel
Exempel 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
Uppdaterar BastionHost-resursen med Basic Sku och 2 skalningsenheter till Standard Sku och 10 skalningsenheter
Exempel 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
Uppdaterar BastionHost-resursen med Basic Sku och 2 skalningsenheter till Standard Sku och 50 skalningsenheter
Parametrar
-AsJob
Kör cmdlet i bakgrunden
Typ: | SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-Confirm
Uppmanar dig att bekräfta innan du kör cmdleten.
Typ: | SwitchParameter |
Alias: | cf |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Typ: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DisableCopyPaste
Kopiera och klistra in
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-EnableIpConnect
IP Connect
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-EnableKerberos
Kerberos
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-EnableSessionRecording
Sessionsinspelning
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-EnableShareableLink
Delningsbar länk
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-EnableTunneling
Intern klient
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-Force
Be om bekräftelse om du vill skriva över en resurs
Typ: | SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-InputObject
BastionHost-objektet
Typ: | PSBastion |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-ScaleUnit
The Bastion Scale Units
Typ: | Nullable<T>[Int32] |
Position: | Named |
Standardvärde: | 2 |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-Sku
Bastion SKU-nivån
Typ: | String |
Godkända värden: | Basic, Standard, Premium |
Position: | Named |
Standardvärde: | Basic |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-Tag
En hashtable som representerar resurstaggar.
Typ: | Hashtable |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-WhatIf
Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.
Typ: | SwitchParameter |
Alias: | wi |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
Indata
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]]
Utdata
Relaterade länkar
Azure PowerShell