How to get an elevated powershell in MobaXterm


Is it possible to create an elevated powershell prompt with MobaXterm? That is, a shell with admin privileges?

Below is a picture of the 'Session' window of MobaXterm with the 'Shell' tab selected, 1. The choice is between Bash, Cmd, Powershell or Ubuntu Bash. However, they open with the permissions of the current user. I'd like to open them (preferably Powershell) as Administrator.

I'm currently using MobaXterm for my ssh needs, and Cmder for local shells. I'd like to harmonize this into a single tool. Cmder has the option to start a new shell as Administrator, but I can not find this option in MobaXterm.

Running Chocolatey is the main thing I'm using an elevated shell for, so it is not that annoying to start some other shell for just that once in a while.

mobaxterm shell window

Best Answer

  • This may not be an elegant solution, but this is what worked for me:

    • Create a shortcut to MobaXterm: On your desktop (or in some other location, i.e. Documents), right-click > New > Shortcut
    • Browse to the location where MobaXterm is installed, select MobaXterm.exe, then click OK (i.e. C:\Program Files (x86)\Mobatek\MobaXterm\MobaXterm.exe)
    • Click Next
    • Give your shortcut a name, such as MobaXterm (Admin), then click Finish
    • Right-click the shortcut, then click Properties
    • On the Shortcut tab, click the Advanced... button
    • Select Run as administrator, click OK, then OK again

    You'll now be able to run MobaXterm, along with all your sessions with elevated privileges.

    NOTE: If you want to keep things tidy, you can also move the shortcut to the folder/directory where MobaXterm.exe is installed. If your MobaXterm folder is in one of the Program Files folders, you won't be able to create the shortcut directly in that location; however, once your create the shortcut following the above steps, you should be allowed to move the shortcut.

    Now if you like, for quick access, you can:

    • Pin the shortcut to the taskbar: Right-click the shortcut, then click Pin to taskbar
    • If you use a dock (i.e. ObjectDock), you can drag the shortcut to your dock
    • Add a shortcut on your Desktop (if you chose to create the shortcut in another location)

    Since MobaXterm will now have elevated privileges, you may want to secure it by setting up a Master Password (For MobaXterm Professional only):

    • Launch MobaXterm Professional
    • Click Settings > Configuration
    • In the General tab, click MobaXterm passwords management
    • Click the Set a "Master Password" for strong passwords encryption button
    • Enter a password
    • Select Prompt for master password after resuming from monitor standby mode to beef up security even more
      • Click OK, OK, then OK again
  • Related Question