I want to install tools like NAGIOS inside an Azure virtual machine once it is provisioned. I want to use "Azure Custom Script" to install the tools. Below is the code that I am using.
Powershell script that is being sent as custom script:
new-item "C:\newfile.txt" -Type file
copy-item -Path "\\xxx.xx.x.x\c$\Nagios for windows" -Destination "C:\nagios" -Recurse
Start-Process "c:\nagios\NSCP-0.4.3.143-x64.msi" /qn -Wait
Problem: The first line of code is working (I have it as a sanity check to confirm that the script is indeed working). However, the second and third line is not working (the most important part). I am not seeing any errors in the logs as well. Can someone help me out, please?