Remote Desktop Connection from CMD


  1. Posts : 37
    Windows 10
       #1

    Remote Desktop Connection from CMD


    I created a file with the .bat extension, in which I wrote the following script:$Hostname = "MyHostname"$User = "MyUser"$Password = "ZZZ"cmdkey / generic: $Hostname / user: $User / pass: $Passwordmstsc / v: $Hostname /f

    But I get the following error: The remote computer name ($Hostname) is not a valid name
      My Computer


  2. Posts : 8,111
    windows 10
       #2

    If NetBIOS isn't up to date it won't resolve the name try with IP
      My Computer


  3. Posts : 37
    Windows 10
    Thread Starter
       #3

    With IP address it works, thank you!

    - - - Updated - - -

    What command I have to type inside the .bat file to close command prompt window ?
    With exit doesn't work.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:09.
Find Us




Windows 10 Forums