d3ullist

GetLocalSettings.ps1

Nov 2nd, 2022
1,402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $param1=$args[0]
  2.  
  3. # check if NPM is available
  4. # check if Azure CLI (azure function core tools) is available
  5.  
  6. # install azure function core tools
  7. # $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
  8. # Check if folder contains a .csproj & .settings file (aka are in right path)
  9.  
  10. az login
  11.  
  12. # az account set -s "<subscription-name-or-id>"
  13.  
  14. # Obtain the settings of function by name
  15. func azure functionapp fetch-app-settings $param1 --output-file local.settings.json
  16.  
  17. func settings decrypt
Advertisement
Add Comment
Please, Sign In to add comment