Skip to content

Instantly share code, notes, and snippets.

@manualbashing
Last active January 2, 2020 22:27
Show Gist options
  • Select an option

  • Save manualbashing/06ebc50e9f76e11efe33134a536bacc6 to your computer and use it in GitHub Desktop.

Select an option

Save manualbashing/06ebc50e9f76e11efe33134a536bacc6 to your computer and use it in GitHub Desktop.
[Azure Resource Manager Cheatsheet]

Custom Script Extension

Download Path for Script Files

C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.10.3\Downloads\0

Log File Path

C:\WindowsAzure\Logs\Plugins\Microsoft.Compute.CustomScriptExtension\1.10.3

Test with PowerShell

$setAzVMCustomScriptExtensionSplat = @{
    VMName = 'academy001'
    Name = 'DemoScriptExtension'
    FileUri = 'https://foo.blob.core.windows.net/deploy/lab_vm_postInstall.ps1'
    Location = 'West Europe'
    Run = 'powershell -ExecutionPolicy Bypass -File lab_vm_postinstall.ps1 storage20200102224911'
    ResourceGroupName = $rgName
}
Set-AzVMCustomScriptExtension @setAzVMCustomScriptExtensionSplat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment