Administrator account name rename and password change

Hi ,

So I provisioned a Windows VM on Vcenter and I want to Rename the name of Administrator account name as Admin and I also want to change the password of that machine through ruby script . So Can you help me with that ???

I’d have thought this would be easier from an Ansible playbook rather than Ruby, using the WinRM module and a PowerShell script. The PowerShell seems to be something like Rename-LocalUser -Name "Current Name" -NewName "New Name".