Nice to meet you!
Yes,I want to change the password of the operating system in this way.
Windows virtual machines can set different passwords through custom specifications.
But LINUX does not seem to have this parameter.


So I found this way with script.
The script has been written and the test passed, the content is as follows:

Tested by creating a virtual machine from the template, it succeeded, the password for the OS was changed, and the "zjy.out" file was also generated in the root directory.
Up to now, the operation is carried out on the website.
I want to be able to pass in this script when creating a new virtual machine customization specification through powershell.
I can't find the relevant parameters to pass this script when generating the virtual machine customization spec.Like this

I know that there is a way to change the password of the virtual machine through Invoke-VMScript, but I don't know the original password of the virtual machine.
So I hope to modify it through powershell, not through the web page.
thank you for your reply!