Some commands need administrative or elevated command prompt to work properly but when you usually open a command prompt, you get a regular or un-elevated command prompt. On Windows 8 and 10 you could easily get this both Command Prompt and Command Prompt (Admin) by right clicking on Start Menu or pressing Win + X . Starting from Windows 10 build 14971, this option was replaced by Windows PowerShell and Windows PowerShell (Admin). You can run most (not all) of the Windows Commands in PowerShell as well but you may still want to access Command Prompt.
There are many ways you can still open a elevated Command Prompt from Windows 10. The easiest is from the Windows Search Box on the task bar.
Method 1: Open Elevated Command Prompt from Search
Type cmd or command in the Search box to list Command Prompt.
Right click on Command Prompt listed in search result and select Run as Administrator
If you dont see the search box on your task bar, it is probably hidden and you can make it visible by right clicking on task bar → Cortana → Show search box.
Note: If your user account do not have administrative privileges, you will be asked for administrative password when you try to lauch Admin Command Prompt.
Method 2: Open Elevated Command Prompt using command
You can launch an elevated command prompt from inside a regualr command prompt by running a command. If you are looking for something similar to
sudo from other Linux like operating systems, there is not an exact one in Windows. However there is a command that you can run to launch Elevated Command Prompt in another window.
If the administrator username is Amanda for example, just run the command
runas /user:Amanda cmd
You will be prompted for
C:\MyDir> runas /user:Amanda cmd Enter the password for Amanda: Attempting to start cmd as user "MYPC\Amanda" ...
This will lauch a new command window as admin user. The run as command has lot of options for loading a user's profile, environment etc. You can see the usage by simply entering runas without any options. This will show all available options.