OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How can i copy a file to azure app service bin directory using powershell?

  • Thread starter Thread starter Stacey
  • Start date Start date
S

Stacey

Guest
I have a file that i want to copy to the bin directory of an azure app service. Currently i do this manually , but i want to do it automatically.

I have found this so far

Code:
  $localFiles = Get-ChildItem $tempFolder

  $accessToken = Get-KuduApiAuthorisationHeaderValue $resourceGroupName $webappName
 
$localFiles | % {
Write-Host "Uploading $($_.Name)" -NoNewline
Upload-FileToWebApp $accessToken $webappName $_.Name $_.FullName 
Write-Host -f Green " [Done]"
}

How can i do this ? where do i even start ?
<p>I have a file that i want to copy to the bin directory of an azure app service.
Currently i do this manually , but i want to do it automatically.</p>
<p>I have found this so far</p>
<pre><code> $localFiles = Get-ChildItem $tempFolder

$accessToken = Get-KuduApiAuthorisationHeaderValue $resourceGroupName $webappName

$localFiles | % {
Write-Host "Uploading $($_.Name)" -NoNewline
Upload-FileToWebApp $accessToken $webappName $_.Name $_.FullName
Write-Host -f Green " [Done]"
}
</code></pre>
<p>How can i do this ? where do i even start ?</p>
Continue reading...
 

Latest posts

Top