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

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
  • Instagram
  • LinkedIn

Anup Thapa primarily covers Windows systems, networking, and computer hardware at TechNewsToday. 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 from coding and hardware installation to writing. 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 skill set, but also a unique perspective for writing that enables him to concisely communicate complex information and solve his reader's problems efficiently. You can reach out to him at anup@technewstoday.com.

Related Posts

what happens if you turn off your computer during an update

What Happens if You Turn Off Your Computer During an Update?

September 18, 2023
How to Disable Integrated Graphics

How to Disable Integrated Graphics?

September 16, 2023
System Restore Stuck

How To Fix Windows Stuck on System Restore

September 16, 2023
startup-repair-couldn't-repair-your-pc

How To Fix “Startup Repair Couldn’t Repair Your PC”

September 13, 2023
how to free up ram

How to Free Up Memory

August 4, 2023
how to make your desktop look cool

How to Make Your Desktop Look Cool and Aesthetic

July 28, 2023
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
motherboard chipset

Understanding Motherboard Chipset and Its Importance

September 20, 2023
Naval-Warfare-Games

Best Naval Warfare Games

September 18, 2023
virtualbox-vs-vmware

VirtualBox Vs VMware: Which Is Best For You?

September 20, 2023
You may also like
printer-not-printing

How to Fix a Printer That’s Not Printing

September 20, 2023
Share Location With Friends and Family

Share Location With Friends and Family (iPhone and Android)

September 18, 2023
how-to-print-without-a-printer

How to Print Without a Printer

September 18, 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.