Azure Functions PowerShell Language Worker
This repository will host the PowerShell language worker implementation for Azure Functions. We'll also be using it to track work items related to PowerShell support. Please feel free to leave comments about any of the features and design patterns.
🚧The project is currently work in progress. Please do not use in production as we expect developments over time. To receive important updates, including breaking changes announcements, watch the Azure App Service announcements repository. 🚧
Triggers / Bindings
- HTTP Trigger (Webhook)
- Timer Trigger
- Blob Trigger
- Queue Trigger
- More triggers and bindings
- Tooling integration
- A bunch of other good things
This project is not currently taking pull requests because it's still in the early development and is changing rapidly.
Building from source
- Clone this repository
NOTE: If you're missing a dependency, you will be asked to run
Run & Debug
The PowerShell worker alone is not enough to establish the functions app, we also need the support from Azure Functions Host. You may either use a published host CLI or use the in-development host. But both of the methods require you to attach to the .NET process if you want a step-by-step debugging experience.
First, follow the instructions to install the Azure Functions Core Tools.
Then locate the
Here are a few hints on where it could be located:
On Windows if you installed via
On macOS if you installed via
Copy the result of the
publish directory into a
powershell folder under
Copy-Item -Recurse -Force ./src/bin/Debug/netcoreapp2.1/publish/ "/usr/local/Cellar/azure-functions-core-tools/$(func --version)/workers/powershell"
NOTE: if the powershell folder already exists, you should delete it or debugging won't work.
cd into a Function App with PowerShell as the worker runtime
(NOTE: There's an example PowerShell Function App in the
NOTE: If you would like to see more out of the logs, see the logging section in the Azure Functions Host repo.
A developer may also use the latest host code by cloning the git repository Azure Functions Host. Now you need to navigate to the root folder of the host project and build it through:
dotnet restore WebJobs.Script.sln dotnet build WebJobs.Script.sln
After the build succeeded,
set the environment variable
to the root folder path (the folder which contains the
of your test functions app.
Then copy the
publish directory to
Copy-Item -Recurse -Force ./src/bin/Debug/netcoreapp2.1/publish/ "<Azure Functions Host Root>/src/WebJobs.Script.WebHost/bin/Debug/netcoreapp2.1/workers/powershell"
Then you can start the host but running:
Note: Remember to remove
"AzureWebJobsScriptRoot"environment variable after you have finished debugging, because it will also influence the
To package the PowerShell Language Worker as a nupkg, do the following:
That will place a
It pulls the contents of the publish folder in:
if you specify a different Configuration or TargetFramework that will be honored.