In this hands-on lab, we install Azure Functions Core Tools on a Windows VM. After that, we will be able to develop and run Azure Functions.
Successfully complete this lab by achieving the following learning objectives:
- Log In to the Azure Portal
Log in to the Azure Portal using the username and password supplied by the lab.
- Open a browser.
- Navigate to the provided Azure Portal URL.
- Use the supplied username and password to authenticate.
- Remote into the Windows VM
Starting in the Azure dashboard, perform the following tasks:
- Open the navigation menu in the upper-left of the Portal.
- Click on All resources.
Wait for the list of all the resources to appear.
In the list, click on the lab-VM resource.
Wait for the VM overview page to open. On that page, make note of the public IP address.
Using a remote desktop client, connect to the IP address of the VM. Log in using the following credentials:
Accept the certificate if asked to do so.
Wait patiently for the desktop to load and stabilize, and click ‘No’ for network sharing. Close the server manager if it opens.
- Install Azure Functions Core Tools
@"%SystemRoot%System32WindowsPowerShellv1.0powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%chocolateybin"
Test that the install worked with the following command:
Install the .NET Core SDK version 2.1 using the following command:
choco install dotnetcore-sdk --version=2.1.502 -y
Check that .NET Core SDK is installed properly by opening a new command prompt and running the following command:
Now install NodeJS using choco:
choco install nodejs-lts -y --force
Open a new administrative command prompt and install Azure Functions Core Tools using the following command:
npm i -g azure-functions-core-tools@3 --unsafe-perm true
- Test That the Azure Function Core Tools Are Properly Installed
Open a new command prompt and execute the following command:
If successful the prompt will display a bunch of output and the Azure Functions lightning bolt.