I am trying to run a Script using Custom Script extension on the VM. I am able to upload my Custom Script ( on my local drive) navigating via UI in the Extension settings but I am not able to do the same via CLI / Powershell
I am looking for az vm extension (CLI) / Set-AzVMCustomScriptExtension command that can help me to do the above i.e. to
Upload / Run a custom script extension for a script present @ local disk or Azure Repo
I have tried various ways the closest I could get is Set-AzVMCustomScriptExtension -FileUri "file:///D:/scripts/TINFAD01.ps1" -ResourceGroupName p1cad-draas-sb-dev-dev -Location eastus -VMname TINFAD01 -Verbose -Name TINFAD01DSC -Run 'TINFAD01.ps1' | Update-AzVM -Verbose
Gives an error of : Part of the path not found ( I have double checked the path and it does exist)