Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Remotely Start CMD

  • 24-02-2016 6:08pm
    #1
    Registered Users, Registered Users 2 Posts: 6,309 ✭✭✭


    Hi guys,

    Hoping a Windows admin can help me out.
    How can I run cmd prompt on remote machines on my network?

    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 10,910 ✭✭✭✭28064212


    So you want to open a command prompt window locally, but the commands run on the remote machine? Download psexec to your local computer and run:
    psexec \\192.168.1.100 cmd
    
    Or if you need to run it as a different user:
    runas /netonly /user:domain\user "psexec \\192.168.1.100 cmd"
    
    There are a couple of caveats, like the fact that tab-completion doesn't work.

    Depends on what you want to do really. I find remote prompts pretty awkward and slow. For example, if you want to start a windows service, you're better off starting a local prompt and running
    sc \\192.168.1.100 start NameOfService
    

    Boardsie Enhancement Suite - a browser extension to make using Boards on desktop a better experience (includes full-width display, keyboard shortcuts, dark mode, and more). Now available through your browser's extension store.

    Firefox: https://addons.mozilla.org/addon/boardsie-enhancement-suite/

    Chrome/Edge/Opera: https://chromewebstore.google.com/detail/boardsie-enhancement-suit/bbgnmnfagihoohjkofdnofcfmkpdmmce



  • Registered Users, Registered Users 2 Posts: 6,309 ✭✭✭T-K-O


    Thank you, tried and tested this morning!


  • Moderators, Arts Moderators, Regional Abroad Moderators Posts: 11,107 Mod ✭✭✭✭Fysh


    T-K-O wrote: »
    Thank you, tried and tested this morning!

    Another option which is more versatile but may also be more work to set up is PowerShell's PSSession.

    Enter-PSSession {fqdn or ip address} will attempt to open the connection; you'll need winrm enabled and possibly firewall rules. But with those configured, you can then do anything for which a cmdlet exists from your local machine. Once you're finished, Exit-PSSession will terminate the session for you.


Advertisement