Get-AzBastionShareableLink
Bastion 可共用連結功能可讓使用者使用 Azure Bastion 連線到目標資源 (虛擬機器或虛擬機器擴展集),而不需存取Azure 入口網站。
PowerShell
Get-AzBastionShareableLink
-ResourceGroupName <String>
-Name <String>
[-TargetVmId <System.Collections.Generic.List`1[System.String]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PowerShell
Get-AzBastionShareableLink
-ResourceId <String>
[-TargetVmId <System.Collections.Generic.List`1[System.String]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PowerShell
Get-AzBastionShareableLink
-InputObject <PSBastion>
[-TargetVmId <System.Collections.Generic.List`1[System.String]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
針對要求中指定的所有 VM,傳回 Bastion 可共享連結。
PowerShell
Get-AzBastionShareableLink -ResourceGroupName $RgName -Name $bastionName
{
"vm": {
"id": "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm"
},
"bsl": "http://bst-bastionhostid.bastion.com/api/shareable-url/tokenvm",
"createdAt": "2019-10-17T12:00:00.0000Z"
}
PowerShell
Get-AzBastionShareableLink -InputObject $bastion -TargetVmId $vm1.Id
{
"vm": {
"id": "/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1"
},
"bsl": "http://bst-bastionhostid.bastion.com/api/shareable-url/tokenvm1",
"createdAt": "2019-10-17T12:00:00.0000Z"
}
取得 Bastion 資源上指定 VM 的可共享連結。。
在背景執行 Cmdlet
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
執行 Cmdlet 之前先提示您確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
Bastion 物件
類型: | PSBastion |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
Bastion 資源名稱。
類型: | String |
別名: | ResourceName, BastionName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
Bastion 資源所在的資源組名
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
Bastion 資源標識碼
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
要取得 Bastion 可共享連結的 VM 識別碼
顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
List<T>[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
List<T>[[Microsoft.Azure.Commands.Network.Models.Bastion.PSBastionShareableLink, Microsoft.Azure.PowerShell.Cmdlets.Network, Version=7.5.0.0, Culture=neutral, PublicKeyToken=null]]