我如何可以自动定制命令提示符的过程? [英] How can I automate the process of customizing the command prompt?
问题描述
我花了我大部分时间在命令行(XP / 7),总是发现自己定制的命令提示符下,根据我的preferences。这适用于CMD和PowerShell提示符。
I spend most of my time on command line ( XP / 7 ) and always find myself customizing the command prompt according to my preferences. This applies to both cmd and powershell prompt.
Width: 140
Height: 40
Left: -4
Top: 20
Font: Lucida Console
Font Size: 16
Text Color: RGB(100,150,200)
QuickEdit Mode: Enabled
每当我在新服务器上,我需要做一遍这一点。我怎样才能在一个批处理文件或PowerShell脚本将这些参数自动完成这一过程?
Whenever I am on a new server, I would need to do this all over again. How can I automate this process by putting these parameters in a batch file or PowerShell script?
推荐答案
您可以使用PowerShell中的注册表提供与 *沿 - 项目
和 * - ItemProperty
cmdlet来修改此注册表项下的注册表值: HKEY_CURRENT_USER \\控制台
You can use the Registry provider in PowerShell along with the *-Item
and *-ItemProperty
cmdlets to modify the registry values under this registry key: HKEY_CURRENT_USER\Console
.
这篇关于我如何可以自动定制命令提示符的过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!