How to access Virtual machine using powershell script
Posted
by
Sheetal
on Server Fault
See other posts from Server Fault
or by Sheetal
Published on 2014-08-19T10:05:28Z
Indexed on
2014/08/19
10:22 UTC
Read the original article
Hit count: 186
Windows
I want to access the virtual machine using powershell script. For that I used below script,
Enter-PSSession -computername sheetal-VDD -credential compose04.com\abc.xyz1
where, sheetal-VDD is hostname of virtual machine
compose04.com is the domain name of virtual machine and
abc.xyz1 is the username of virtual machine
After entering above command , it asks for password. When the password is entered I get below error,
Enter-PSSession : Connecting to remote server failed with the following error message : WinRM cannot process the reques t. The following error occured while using Kerberos authentication: There are currently no logon servers available to s ervice the logon request. Possible causes are: -The user name or password specified are invalid. -Kerberos is used when no authentication method and no user name are specified. -Kerberos accepts domain user names, but not local user names. -The Service Principal Name (SPN) for the remote computer name and port does not exist. -The client and remote computers are in different domains and there is no trust between the two domains. After checking for the above issues, try the following: -Check the Event Viewer for events related to authentication. -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or us e HTTPS transport. Note that computers in the TrustedHosts list might not be authenticated. -For more information about WinRM configuration, run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic. At line:1 char:16 + Enter-PSSession <<<< -computername sheetal-VDD -credential compose04.com\Sheetal.Varpe + CategoryInfo : InvalidArgument: (sheetal-VDD:String) [Enter-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
Can someone help me out in this?
© Server Fault or respective owner