Setting Windows Administrator Password

Hello Team,
Is there any way to set password for Administrator Account for windows apart from Administration->Settings->Provisioning
We are able to do that for Linux in layouts by using cloud-init
image

How can something similar be done for Windows

you can fill out the username and password fields on virtual images to set passwords if using cloud-init or guest customization.

Thank you

Hi @cbunge, can you suggest the format for how the cloud-init setting should be set similar to what is done in the screenshot above for the Linux base image under the image listed in the virtual image?

I kind of looked at the docs but could not find any relevant information for the same. your help or suggestions would be of great help

If you just define the user/pass in the fields and the image is using cloud init I believe we define that user within the image.

Looks like you are trying to define user data block which I don’t believe is required for this use case.

@cbunge

can you we something like the below to set the admin password for Windows? so that at the time of provisioning cloud-init will reset the password?


#cloud-config
users:
  -
    name: Administrator
    primary_group: administrators
    groups: administrators
    passwd: YOURPASSWORDHERE
    inactive: False
runcmd:
  - "net user administrator /active:no"
  - "net user admin /active:no"
  - "shutdown -r"

++ Also for cloud config as above to work, does the Windows image prep need cloud-init for Windows to be configured, since the image preparation step in Morpheus doc I don’t see it.