在您使用命令提示符(Command Prompt)或PowerShell工作一段时间后,您可能最终会自定义它们的外观。毕竟,默认情况下,它们的外观和颜色对许多人来说看起来很单调。您可以更改字体、大小、背景颜色和其他内容。如果要将PowerShell重置为其默认设置和颜色,该怎么办?您可以重置命令提示符 (cmd) 的(Command Prompt's (cmd))颜色和设置吗?不幸的是,任何地方都没有“恢复控制台默认值”("Restore console default")按钮!幸运的是,一如既往,您可以做一些事情。阅读本指南以了解如何将PowerShell或命令提示符(Command Prompt)重置为其默认设置:
注意:(NOTE:)在遵循本指南中的任何方法之前,您应该创建一个系统还原点(System Restore point)。如果您不喜欢结果,这可以确保您可以将系统恢复为当前设置。
如何将PowerShell重置为其默认颜色(default color)设置
PowerShell 的(PowerShell's)颜色和整体控制台外观存储在其快捷方式文件(shortcut file)中,而不是单独的文件或注册表项(file or registry key)中。换句话说,要将PowerShell重置为其默认颜色(default color)设置,您需要从“开始”菜单重置(Start Menu)PowerShell 的(PowerShell's)快捷方式。首先打开文件资源管理器(File Explorer)并使用它导航到此位置:"C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell,",其中User是您的 Windows 10 用户帐户的名称。
在Windows PowerShell文件夹中,删除“Windows PowerShell”和/或“Windows PowerShell (x86)”快捷方式,具体取决于您要重置的快捷方式。
现在您必须重新创建PowerShell快捷方式。很明显,您可以简单地创建PowerShell快捷方式并将它们指向 PowerShell 的可执行文件(PowerShell)。但是,如果您这样做,PowerShell不会将其配色方案(color scheme)恢复为其默认状态(default state)。
您现在有两个选项可供选择。您可以在 Windows 10 PC上创建新(PC and copy)用户帐户(user account)并从其"C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell"文件夹中复制PowerShell快捷方式,或者从我们这里下载默认的PowerShell快捷方式。继续阅读以了解两种方式:
如果您选择在您的 PC 上创建新用户帐户,则在创建后,使用(user account)文件资源管理器(File Explorer)导航到"C:\Users\New User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell,",其中New User是该用户的帐户文件夹(account folder)。然后,从那里复制PowerShell快捷方式,并将它们粘贴到"C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell"文件夹中。
如果您不想在 Windows 10 PC 上创建新用户帐户,可以使用(user account)此链接(this link)直接从我们这里下载原始PowerShell快捷方式。我们将PowerShell(PowerShell)快捷方式打包在一个zip 文件(zip file)中。下载并将其保存在 PC 上的某个位置后,解压缩它。
然后,您将获得一个名为Windows PowerShell的文件夹,其中包含来自Windows 10的所有原始PowerShell快捷方式,包括PowerShell ISE快捷方式。复制要重置为默认颜色(default color)设置的那些,并将它们粘贴到"C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell"文件夹中。
下载:(Download:) PowerShell 快捷方式(PowerShell Shortcuts)
而已!无论(Regardless)您选择如何恢复PowerShell快捷方式,当您打开PowerShell 时,(PowerShell,)它的颜色和布局都应该重置(layout reset)为默认值。
如何使用我们的注册表文件将(registry file)命令提示符(Command Prompt)重置为其默认设置
如果您不想弄脏自己的手,那么这种将命令提示符 (cmd)(Command Prompt (cmd))重置为其默认颜色设置的方法是您应该遵循的方法。(default color)首先(Start)下载我们的CMD Default.zip文件并将其保存在您的 Windows 10 PC 上的某个位置。任何位置都可以,包括您的桌面(Desktop)。请注意,您还可以在本节末尾找到指向它的链接。
下载后,解压缩CMD Default.zip文件的内容。
解压缩存档后,您将获得一个名为CMD Default.reg的(CMD Default.reg)Windows 注册表文件(Windows Registry file)。双击或双击它以运行它。
Windows 10 可能会警告您我们的注册表文件(registry file)未被识别为来自受信任的发布者。那是因为它是我们自己做的,全世界下载和使用的人并不多。相信(Trust)我们,它是安全的,不会对您的计算机或设备(computer or device)造成任何伤害。单击(Click)或点击运行(Run)以继续。
将显示UAC(用户帐户控制(User Account Control))提示。确认您要继续。
然后,系统会询问您是否确定要继续。单击(Click)或点击是,然后对(Yes)Windows 注册表(Windows Registry)进行一些更改。它们将在本文的下一部分中详细解释。
注册表编辑器(Registry Editor)确认更改已成功执行。单击(Click)或点击确定(OK)。
命令提示符(Command Prompt)现在已重置为其默认外观(default look and feel)。
下载:(Download:) CMD 默认(CMD Default)
注意:(NOTE:)重置命令提示符(Command Prompt)后,您可能想了解更多关于如何最好地对其进行个性化的信息:如何在Windows 10中自定义(Windows 10)命令提示符(Command Prompt)(cmd) 。
如何通过手动编辑Windows 注册表将(Windows Registry)命令提示符(Command Prompt)重置为其默认设置
这种将命令提示符 (cmd)(Command Prompt (cmd))重置为其默认设置和颜色的方法需要您掌握更多知识。如果您认为自己是高级用户(power user),请继续。如果没有,则坚持以前的方法更安全。
打开注册表编辑器(Registry Editor)并导航到此位置:"Computer > HKEY_CURRENT_USER > Console."
这是命令提示符(Command Prompt)保留控制窗口外观和使用颜色的设置的地方。如果您希望 Windows 10 将CMD 的(CMD's)颜色重置为其默认值,您需要从Windows 注册表中删除(Windows Registry)Console键。右键单击或点击并按住控制台(Console),然后从上下文菜单中选择删除。(Delete)
确认您要删除此键及其所有子键。
关闭注册表编辑器,(Registry Editor,)您就完成了:下次在 Windows 10 PC 上打开命令提示符(Command Prompt)时,它应该具有默认外观(default look)。
您(Did)是否设法将PowerShell 和命令提示符(PowerShell and Command Prompt)重置为其默认设置?
现在您知道如何将命令提示符(Command Prompt)和PowerShell重置为其默认设置。不过要记住一件事:它们仅针对您的用户帐户(user account)重置。这些工具的视觉设置存储在“每个用户”的基础上。如果您想为其他用户帐户(user account)重置他们的窗口,您需要再次执行相同的过程,同时使用这些用户帐户(user account)登录。如果您有任何问题或要添加到我们的指南中,请随时在下面的部分中发表评论。
Reset PowerShell and CMD to their default settings
After you work for a while with the Command Prompt or PowerShell, you are likely to end up customizing the way they look. After all, by default, their looks and colors look quite dull for many. You might change the font, its size, the color of the background, and other things. What do you do if you want to reset PowerShell to its default settings and colors? Can you reset Command Prompt's (cmd) colors and settings? Unfortunately, there's no "Restore console default" button available anywhere! Fortunately, as always, there is something you can do. Read this guide to learn how to reset PowerShell or the Command Prompt to its default settings:
NOTE: Before following any of the methods from this guide, you should create a System Restore point. That assures you that you can revert your system to its current settings if you don't like the result.
How to reset PowerShell to its default color settings
PowerShell's colors and overall console looks are stored in its shortcut file instead of a separate file or registry key. In other words, to reset PowerShell to its default color settings, you need to reset PowerShell's shortcut from the Start Menu. Start by opening File Explorer and use it to navigate to this location: "C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell," where User is the name of your Windows 10 user account.
In the Windows PowerShell folder, delete the "Windows PowerShell" and/or "Windows PowerShell (x86)" shortcuts, depending on which one you want to reset.
Now you must recreate the PowerShell shortcuts. It would seem obvious that you could simply create the PowerShell shortcuts and point them at the executable files of PowerShell. However, if you do that, PowerShell doesn't revert its color scheme to its default state.
You have two options that you can choose from right now. You can either create a new user account on your Windows 10 PC and copy the PowerShell shortcuts from its "C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell" folder, or download the default PowerShell shortcuts from us. Read on to see both ways:
If you choose to create a new user account on your PC, after you've created it, use File Explorer to navigate to "C:\Users\New User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell," where New User is that user's account folder. Then, copy PowerShell shortcuts from there, and paste them in your "C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell" folder.
If you prefer not to create a new user account on your Windows 10 PC, you can download the original PowerShell shortcuts directly from us, using this link. We packed the PowerShell shortcuts in a zip file. Once you download it and save it somewhere on your PC, unzip it.
You then get a folder called Windows PowerShell that contains all the original PowerShell shortcuts from Windows 10, including the PowerShell ISE shortcuts. Copy the ones you want to reset to their default color settings, and paste them in your "C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell" folder.
Download: PowerShell Shortcuts
That's it! Regardless of how you chose to restore your PowerShell shortcuts, when you open PowerShell, it should have its colors and layout reset to the defaults.
How to reset Command Prompt to its default settings, using our registry file
This method for resetting Command Prompt (cmd) to its default color settings is the one you should follow if you don't want to get your hands dirty. Start by downloading and saving our CMD Default.zip file somewhere on your Windows 10 PC. Any location is OK, including your Desktop. Note that you can also find a link to it at the end of this section.
Once you've downloaded it, extract the contents of the CMD Default.zip file.
After you extract the archive, you get a Windows Registry file called CMD Default.reg. Double-click or double-tap on it to run it.
Windows 10 might warn you that our registry file is not recognized as coming from a trusted publisher. That's because it was made by us, and there are not that many people who download and use it worldwide. Trust us that it is safe and doesn't do any harm to your computer or device. Click or tap on Run to continue.
A UAC (User Account Control) prompt is displayed. Confirm that you want to go ahead.
Then, you are asked whether you are sure you want to continue. Click or tap on Yes, and a few changes are made to the Windows Registry. They are explained, in detail, in the next section of this article.
The Registry Editor confirms that the changes were performed successfully. Click or tap OK.
The Command Prompt is now reset to its default look and feel.
Download: CMD Default
NOTE: When you are done resetting the Command Prompt, you may want to learn more about how to best personalize it: How to customize the Command Prompt (cmd) in Windows 10.
How to reset Command Prompt to its default settings, by manually editing the Windows Registry
This method for resetting Command Prompt (cmd) to its default settings and colors involves a bit more knowledge on your part. If you consider yourself a power user, then go ahead. If not, it is safer to stick to the previous method.
Open the Registry Editor and navigate to this location: "Computer > HKEY_CURRENT_USER > Console."
This is where Command Prompt keeps the settings that control what its window looks like and what colors it uses. If you want Windows 10 to reset CMD's colors to their defaults, you need to delete the Console key from the Windows Registry. Right-click or tap and hold on Console and select Delete from the contextual menu.
Confirm that you want to delete this key and all its subkeys.
Close the Registry Editor, and you are done: the next time you open the Command Prompt on your Windows 10 PC, it should have its default look.
Did you manage to reset PowerShell and Command Prompt to their default settings?
Now you know how to reset both Command Prompt and PowerShell to their default settings. There's one thing to keep in mind, though: they are reset only for your user account. The visual settings of these tools are stored on a "per user" basis. If you want to reset their windows for other user accounts, you need to go through the same procedures again, while logged on with those user accounts. If you have any questions or something to add to our guide, do not hesitate to comment in the section below.