Add customscriptextension while deploying hostpool in WVD spring 2020

Occasional Contributor

Hi all,

We have a requirement to install the SCCM client while deploying hostpool to all the VM's which are provisioned under hostpool.

have tried downloaded the template and tried to add customscriptextension at the end of the main template. But it get's failed as parent 

Status Message: Can not perform requested operation on nested resource. Parent resource 'VMName' not found. (Code:ParentResourceNotFound)


Template link here

Please suggest thanks in advance.


3 Replies



is it working when you deploy a host without the script and add script manual?

Sorry, it's been while I haven't checked the post..
Yes it works fine, have added the custom extension script aswell as Azure disk encryption.
Both works fine.
however, in recent new updates in ARM template for AVD, you can add the external templates>> post deployment of machine.
Please can you share your ARM template file and parameters file?
I cannot find a way to install Sophos after the VM is added to the host pool and like you said there is a way to do this now but I need the right json files.
Thanks, M