.net - Azure add vm agent to Virtual machine created from special VHD -


i have vm special vhd file. vm not created through code (in case have vm agent installed).

this special vhd has windows 7, not vm agent inside it. how can automatically install vm agent vm(i know can manually downloading msi file https://go.microsoft.com/fwlink/?linkid=394789&clcid=0x409, , installing agent, i'm looking programmatic solution, perhaps powershell)?

how can automatically install vm agent vm?

we can use powershell install azure vm agent, vm should running , can connect internet.

we can use powershell script install it:

#download msi file: invoke-webrequest -uri "http://go.microsoft.com/fwlink/?linkid=394789" -outfile $env:temp\agent.msi cd $env:temp # unattended installation of vm agent msiexec.exe /i agent.msi /quiet 

like this: enter image description here

after few minutes, can find agent here. enter image description here


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -