Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home»Windows»How to Use the Runas Command in Windows

How to Use the Runas Command in Windows

Anup ThapaBy Anup ThapaDecember 17, 2022
runas command

The Runas command enables a user to perform tasks such as running a specific program with different permissions than what is currently available. Admins commonly use it to quickly perform administrative tasks while logged in to a non-admin account.

We’ve detailed how to use the Runas command, common use cases and examples, parameters, and related errors in the article below.

Note: When using the runas command, the admin account you’re trying to access must be secured with a password. If it doesn’t have a password, you’ll encounter an error as shown below.
runas error 1327

How to Use Runas Command as an Administrator

The Runas Command is commonly used with the /user parameter to perform tasks as an administrator. We’ve listed some useful Runas command examples below.

  • First, let’s look at the syntax. You can copy either of the following formats and replace the device and account name with your own credentials:
    Runas /user:AdminAccountName@DeviceName
    Runas /user:DeviceName\AdminAccountName
  • If you’re trying to access a domain administrator account, you should use the DomainName instead, as shown below:
    Runas /user:AdminAccountName@DomainName
    Runas /user:DomainName\DomainAdminName

You can use the runas command to open .exe files, .msc files, Control Panel items, and shortcuts to programs and saved MMC consoles. We’ve listed the syntax to do so and a few examples below.

Note: When prompted for the password, you can enter it freely as it won’t show up on the screen.
  • The following command uses the filename to launch a command prompt window as an administrator:
    Runas /user:DeviceName\AdminAccountName filename runas-administrator
  • The following command uses the file path to launch an application as an administrator:
    Runas /user:DeviceName\AdminAccountName “filepath” runas-application
  • The following command launches Computer Management using a domain administrator account:
    Runas /user:DomainName\DomainAdminName "mmc %windir%\system32\compmgmt.msc" runas-mmc
  • The following command opens a text file in a domain using Notepad. It uses a domain admin account named Jacques in a domain called domain.tnt.com to open a file named file1:
    Runas /user:jacques@domain.tnt.com “notepad file1.txt” runas-domain

Runas Command Parameters

In addition to /user, there are a few other switches that can come in handy. We’ve concisely explained their functions below.

/noprofile – The user’s profile is loaded by default, but this option specifies it shouldn’t be loaded.
/env – This option specifies to use the current network environment instead of the user’s local environment.
/netonly – This option indicates that the specified credentials are for remote access only.
/savecred – This option specifies to use credentials previously saved by the user.
/trustlevel – This option specifies the authorization level to run the program at.
/showtrustlevel – This option lists the trust levels that can be used as arguments to /trustlevel.

We recommend checking Microsoft’s Runas documentation for the full list of parameters.

How to Fix ‘The Requested Operation Requires Elevation’ Error When Using Runas Command?

First, you could use the /showtrustlevel parameter to check if you can elevate the trust level, and if it’s possible, you can do so with the /trustlevel parameter.

In cases where you’re unable to elevate the trust level any higher, you can apply a workaround. You can enable the default admin account with the following command:
net user administrator /active:yes

This account has higher privileges than a user-created admin account, so you’ll be able to use the runas command without any issues.

how-to
Anup Thapa
  • LinkedIn

Anup Thapa is a tech writer at TechNewsToday. He mostly writes informative articles, tutorials, and troubleshooting guides related to Windows systems, networking, and computer hardware. Anup has been writing professionally for almost 5 years, and tinkering with PCs for much longer. His love for all things tech started when he got his first PC over 15 years ago. It was a Pentium IV system running Windows XP on a single 256 MB stick. He spent his formative years glued to this PC, troubleshooting any hardware or software problems he encountered by himself. Professionally, Anup has had brief forays into a variety of fields like coding, hardware installation, writing, etc. In doing so, he's worked with people of different backgrounds and skill levels, from average joes to industry leaders and experts. This has given him not just a versatile skillset, but also a unique perspective for writing that enables him to concisely communicate complex information and solve his reader's problems efficiently. You can contact him at anup@technewstoday.com

Related Posts

boot loop

14 Ways to Fix Windows Boot Loop

March 19, 2023
how to change windows startup sound

How to Change Windows Startup Sound

March 17, 2023
scan disk windows 10

How to Scan Disk Windows

March 16, 2023
Shared GPU Memory

What is Shared GPU Memory? How is It Different From Dedicated VRAM?

March 12, 2023
firmware vs software

Firmware Vs Software – What’s the Difference?

March 8, 2023
update sound drivers

How to Update Sound Drivers on Windows

March 7, 2023
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
what-does-spooling-mean-on-printer

What Does Spooling Mean on Printer?

March 23, 2023
sata ports on motherboard

All the Types of SATA Ports on Motherboard

March 21, 2023
anti-aliasing-on-or-off

What is Anti Aliasing? Should You Turn It on or off

March 21, 2023
You may also like
caps key not working

6 Ways to Fix Caps Key Not Working

March 23, 2023
how to increase ram on laptop

How to Increase RAM on Laptop? (Step-by-Step Guide)

March 23, 2023
how to overclock ram

How to Overclock RAM? (Step-by-Step Guide)

March 22, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.