You can update a Windows user account using the below-given command. If the username does not exist, a new user will be created.
$ az vm user update -u username -p password -n MyVm -g MyResourceGroup
This command uses VMAccessForLinux 1.5 for Linux operating system and VMAccessAgent 2.4 for Windows operating system.
Hope this helps!
Check out here and become Azure solution architect today.