Windows 10: CLI runas admin

Discus and support CLI runas admin in User Accounts and Family Safety to solve the problem; Code: net localgroup administrators[/quote] Members ----------------------------- Administrator user Code: runas /user:Administrator "chkdsk... Discussion in 'User Accounts and Family Safety' started by jnich, Apr 13, 2017.

  1. jnich Win User

    CLI runas admin


    Code: net localgroup administrators[/quote] Members
    -----------------------------
    Administrator
    user

    Code: runas /user:Administrator "chkdsk c:"[/quote] <enter user, which should be administrator, pass>
    user name or password is incorrect

    Code: runas /user:user "chkdsk c:"[/quote] <enter user pass>
    attempting to start chkdsk c: as user ...

    Fails to run.

    What am I missing here? Is there a way to give Administrator member its own password. It appears as though my user pass doesn't work even though it's supposedly admin. To be clear, I'm not asking how to right click. How do I elevate to admin privilege and run a program through cli?

    :)
     
    jnich, Apr 13, 2017
    #1
  2. cupboy1 Win User

    runas requires elevation - what do I do about this?

    C:\Users\luser>runas /user:admin "mmc gpedit.msc"

    Enter the password for admin:

    Attempting to start mmc gpedit.msc as user "BBY\admin" ...

    RUNAS ERROR: Unable to run - mmc gpedit.msc

    740: The requested operation requires elevation.
     
    cupboy1, Apr 13, 2017
    #2
  3. skumaru Win User
    Nokia Software Updater 2.4.6 keep on asking for system restart on Windows 7

    It looks like the NSU wants to run from true admin account and not from the psudo admin account (RunAs admin). Once I logged into the admin account and ran the NSU, it worked fine.
     
    skumaru, Apr 13, 2017
    #3
  4. Superfly Win User

    CLI runas admin

    This may not be a direct solution as cmd is a bit foreign to me ... however in powershell...

    Code: <################################################# Elevate ######################################################> $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent() $myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID) $adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator if (-not ($myWindowsPrincipal.IsInRole($adminRole))) { Start-Process PowerShell.exe -Verb Runas -ArgumentList $myInvocation.MyCommand.Definition return } <################################################################################################################> chkdsk.exe /f /r e:[/quote] Change the drive letter to whichever - and save as something.ps1
     
    Superfly, Apr 13, 2017
    #4
  5. lx07 Win User
  6. clam1952 Win User
    Over complicating things, just run the Command Processor as Administrator.

    Right Click Run as Administrator.

    Code: Microsoft Windows [Version 10.0.15063] (c) 2017 Microsoft Corporation. All rights reserved. C:\WINDOWS\system32>chkdsk c: The type of the file system is NTFS. Volume label is System. WARNING! /F parameter not specified. Running CHKDSK in read-only mode. Stage 1: Examining basic file system structure ... 327936 file records processed. File verification completed. 3606 large file records processed. 0 bad file records processed. Stage 2: Examining file name linkage ... 397314 index entries processed. Index verification completed. 0 unindexed files scanned. 0 unindexed files recovered to lost and found. Stage 3: Examining security descriptors ... Security descriptor verification completed. 34690 data files processed. CHKDSK is verifying Usn Journal... 36069072 USN bytes processed. Usn Journal verification completed. Windows has scanned the file system and found no problems. No further action is required. 233058303 KB total disk space. 47762496 KB in 141521 files. 95840 KB in 34691 indexes. 0 KB in bad sectors. 555091 KB in use by the system. 65536 KB occupied by the log file. 184644876 KB available on disk. 4096 bytes in each allocation unit. 58264575 total allocation units on disk. 46161219 allocation units available on disk. C:\WINDOWS\system32>[/quote]
     
    clam1952, Apr 13, 2017
    #6
  7. lx07 Win User
    They did say in the first post:

    Perhaps you missed it.
     
  8. clam1952 Win User

    CLI runas admin

    Seems to be a pointless over complication just to run chkdsk......

    Maybe it doesn't work as the Computer name isn't specified? runas /user:computer name\account name chkdsk C:
     
    clam1952, Apr 13, 2017
    #8
  9. jnich Win User
    Thank you lx07! I needed to set a password for Administrator member reboot and runas /user:Administrator to get it working. I'm sorry for the confusion. chkdsk was just an example.
     
    jnich, Apr 13, 2017
    #9
  10. clam1952 Win User
    OK I'm now unconfused, glad you got it sorted. *Smile
     
    clam1952, Apr 13, 2017
    #10
  11. Bree New Member
    Yes, runas requires the account you want to 'run as' to have a password - else you get...
    By default the built-in Administrator account has a blank password and is disabled. Setting a password for Administrator has a downside, it is the account used when booting to the repair environment and your emergency way in when all else fails. Forget that password and your only repair option may be a clean install.

    It would be better to leave Administrator alone, for your purposes I would create another local account (say, Admin) make that an administrator and give it a password. Then you can runas Admin rather than the built-in Administrator.
     
  12. jnich Win User
    This is where my troubles began. According to Windows, my user was the Administrator so running as that user and providing its password should have worked. I tried several times, just to be sure there wasn't a typo when entering my password. Assigning a password to Administrator and rebooting did the job. I'm not worried about forgetting a password in this environment, but I'll keep that in mind.
     
    jnich, Apr 14, 2017
    #12
  13. Pyprohly Win User

    CLI runas admin

    This won’t work. runas isn’t designed to run a program elevated, but when you run a program with the builtin Administrator’s credentials you guarantee that that program runs elevated due to it’s special rights.
     
    Pyprohly, Apr 5, 2018
    #13
Thema:

CLI runas admin

Loading...
  1. CLI runas admin - Similar Threads - CLI runas admin

  2. No Windows console found. Are you running cmd.exe? AWS CLI & Kubectl cli errors

    in Windows 10 Gaming
    No Windows console found. Are you running cmd.exe? AWS CLI & Kubectl cli errors: Hi I connected my visual studio bash terminal to AWS using AWS CLI. Then I installed kubernetes CLI to run my kubernetes commands using the terminal in bash. Everything is connected as I can access my aws account and also view my aws eks cluster. The kubernetes cli also works...
  3. No Windows console found. Are you running cmd.exe? AWS CLI & Kubectl cli errors

    in Windows 10 Software and Apps
    No Windows console found. Are you running cmd.exe? AWS CLI & Kubectl cli errors: Hi I connected my visual studio bash terminal to AWS using AWS CLI. Then I installed kubernetes CLI to run my kubernetes commands using the terminal in bash. Everything is connected as I can access my aws account and also view my aws eks cluster. The kubernetes cli also works...
  4. Windows 20H2 Runas Savecred Broken

    in Windows 10 Network and Sharing
    Windows 20H2 Runas Savecred Broken: Notorious issue i've found on several of our fleet computers that are running Windows 20H2 Particularly Feature Pack 120.2212.2020.0 No surprises, this has broken several things that runas savecred shortcuts just do not initiate anything. Yes i'm aware of security flaws...
  5. Heroku CLI not installing

    in Windows 10 Installation and Upgrade
    Heroku CLI not installing: It says App has been blocked for your protection. How to resolve the issue https://answers.microsoft.com/en-us/windows/forum/all/heroku-cli-not-installing/23e9754b-3617-4b9d-97fe-235276976021
  6. The widows CLI

    in Windows 10 BSOD Crashes and Debugging
    The widows CLI: I used to find the windows command prompt rather limited in what it can preform, especially when compared to Linux capabilities. However over time Microsoft have developed it and the the windows os is now a lot more developer friendly in general. The CLI is a lot less rigid...
  7. Runas File Explorer

    in Windows 10 Ask Insider
    Runas File Explorer: Hello All, Is there a way to open file explorer as another user in windows 10? Thanks, submitted by /u/aspiretoinspire7 [link] [comments] https://www.reddit.com/r/Windows10/comments/hnj0zs/runas_file_explorer/
  8. Runas as administrator without plain password

    in AntiVirus, Firewalls and System Security
    Runas as administrator without plain password: Hello Everyone, I would like to run "psexec.exe" or "runas.exe" without entering password in command line. Meaning is to call password via text file or redirect the password like what psexec -u .\administrator calc.exe -accepteula -nobanner < password.txt...
  9. Runas Credentials Injection Stopped Working

    in AntiVirus, Firewalls and System Security
    Runas Credentials Injection Stopped Working: There's a method of using 'Runas' command with '/netonly' so you could save fake credentials in memory. I check the result with mimikatz. For some reason it worked for me once, but never again since, and I tried several time on different computer with different users. It...
  10. RunAs Taskbar

    in Windows 10 Software and Apps
    RunAs Taskbar: Hello! I wrote my first tool and i would like to present it here. short description: RunAs Taskbar is a free windows software to make your admin-tools easier to organize! If you run RunAs Taskbar as Administrator you will have all programs you are created in a tool...

Users found this page by searching for:

  1. RUNAS ERROR: Unable to run - cmd1326: The user name or password is incorrect.

    ,
  2. windows start cli as administrator

    ,
  3. owershell saps filepath %0 verb runas

    ,
  4. run cmd as admin cli,
  5. win cli admin,
  6. cli run with admin rights,
  7. how to run cli as admin,
  8. enter the password for admin:attempting to start cmd as user desktop-prtgcnv\admin ...runas error: unable to run - cmd1326: the user name or password is incorrect.