I finally managed to run it like this $script = '$admin = [adsi]("WinNT://./administrator, user");$admin.psbase.invoke("SetPassword", "lala");' Invoke-VMScript -ScriptText $script -VM "cs1 - 12...
See more...
I finally managed to run it like this $script = '$admin = [adsi]("WinNT://./administrator, user");$admin.psbase.invoke("SetPassword", "lala");' Invoke-VMScript -ScriptText $script -VM "cs1 - 123456 (tas.gdfg.com)" -guestuser administrator -guestpassword "foo" My final and only question is "can i somehow disable the password policy?" so i can enter "123" as a valid password. Thanks!
No it isn't.But the fact is that if i open powershell in the vm and run the powershell it works correctly... Anyway i have found another way to change the password but it would be nice to know w...
See more...
No it isn't.But the fact is that if i open powershell in the vm and run the powershell it works correctly... Anyway i have found another way to change the password but it would be nice to know why... Thanks! PS:Actually i need this method because the other method that i have found didn't work.
Hello.I don't know why but when i try to Invoke-VMScript the previous script(in order to change a windows machine admin password) i get http://pastebin.com/VjswqtXx Any ideas why? Thanks!