none
Can you login to a virtual machine using a specific username and password threw powershell? RRS feed

  • Question

  • Is this possible? I've been looking for a solution since friday. I'm only seem to find start-vm -Credentials cmdlet but thats only to insert credentials for a user who is allowed to do this. I want to start a VM machine and automatic login on that machine using a set of credentials. Any help or suggestions are welcome!
    • Edited by JeremySky Monday, February 22, 2016 8:03 AM
    Monday, February 22, 2016 8:02 AM

Answers

  • You can change the registry but you have to expose the password t do that.

    You can save your credentials in a terminal server client. 


    \_(ツ)_/

    • Marked as answer by JeremySky Monday, February 22, 2016 10:35 AM
    Monday, February 22, 2016 10:28 AM

All replies

  • There is no command that can do that.  You can start a machine and you can use remotable commands like WMI t access the machine but you cannot automatically log into the machine.


    \_(ツ)_/

    Monday, February 22, 2016 8:59 AM
  • Ok, thanks for the help.

    Does WMI allow when prompted for credentials to send them to multiple machines?

    Monday, February 22, 2016 9:40 AM
  • $cred=Get-Credential

    Use them as often as needed.


    \_(ツ)_/

    Monday, February 22, 2016 9:47 AM
  • Ok, so there is absolutly no way to store the credentials of a virtual machine(windows server 2012R2).

    In each case when login screens appears you have to insert credentials manually?

    Monday, February 22, 2016 10:14 AM
  • You can change the registry but you have to expose the password t do that.

    You can save your credentials in a terminal server client. 


    \_(ツ)_/

    • Marked as answer by JeremySky Monday, February 22, 2016 10:35 AM
    Monday, February 22, 2016 10:28 AM
  • This solved my problem, but now it logs me out automatically after 1 minute even with performing tasks on it.

    Again thanks for getting me further.

    Monday, February 22, 2016 10:52 AM