2

we have one azure storage account which is network restricted. We are saving a file from the runbook but seems it is failing. Any thoughts?

$fileshare ='TestStorage'

#Map to the reports BLOB context
$storageContext = New-AzureStorageContext -StorageAccountName $storageAccount -StorageAccountKey $acctKey
      
$csvTable | Export-CSV $LogFileName -NoTypeInformation

#Copy the file to the storage account : For the .csv file
Set-AzureStorageFileContent –Share $fileshare –Source $LogFileName
Revan
  • 1,104
  • 12
  • 27

1 Answers1

0

You can create a Private link between your Runbook and a subnet approved by your storage account (or a new subnet).

You can also enable and disable on-demand public access from your Runbook.

Note: The private link is not free.

Florian Vuillemot
  • 500
  • 1
  • 4
  • 10