File transfer with Azure Bastion using Azure PowerShell

363 Views Asked by At

Is there a way to perform file upload with Azure Bastion using Azure PowerShell commands.

The deployment of Bastion covered in the link provided below does not cover the file upload/download steps using Azure PowerShell commands.

Deploy Bastion using Azure PowerShell

The below steps in Azure CLI is what I'm trying to achieve using Azure PowerShell commands. CLI link

az network bastion tunnel --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-resource-id "<VMResourceId>" --resource-port "<TargetVMPort>" --port "<LocalMachinePort>"

scp -P <LocalMachinePort>  <local machine file path>  <username>@127.0.0.1:<target VM file path>
0

There are 0 best solutions below