This could happen if PowerShell DSC extension was not able to get admin access on the VM. Ensure that the username and password provided have administrative access on the virtual machine. Add the user account to RDS owner group and run the Azure Resource Manager template again.
Reference: Troubleshooting Guide