Custom Script Extension
The custom script extension opens up opportunities to automate PowerShell and Bash scripts at scale for both cloud and on prem servers.
Many of you will be familiar with the custom script extension, and will be pleased to hear that these are also supported on your Windows and linux Arc-enabled servers.
Create a storage account for custom scripts.
az storage account create --name $sa --sku Standard_LRS --resource-group arc_pilot --location westeurope
Add a couple of containers.
az storage container create --account-name $sa --name powershell --public-access blob
az storage container create --account-name $sa --name bash --public-access blob
Use the extension via the portal to add some software to one of the Windows servers.
- Copy the example custom script
- Add adobereader to the list of chocolatey packages
- Add to your arcpilotsa<uniq> storage account
- container: powershell
- blob: custom_script_windows.ps1
- Run the Custom Script Extension on win-01 via the portal
- Where can you see the version of the extension?
- Where is the installation logging?
- Where would you check for script errors?
- Where was the script downloaded to?
- Where would you check the status?
- use a PowerShell, CLI command or ARM template to run the script on win02 and win03
- Windows Server Custom Script Extension with Azure Arc enabled servers (video)
- Chocolatey packages
- Manage extensions with CLI
- Manage extensions with PowerShell
- Manage extensions using ARM template
- Custom script extension on linux
- Custom script extension on Windows
You’re on the home straight! Just managed identities to go, and that is a guided lab.
Help us improve
Azure Citadel is a community site built on GitHub, please contribute and send a pull requestMake a change