Question:
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.
1 2 3 4 5 6 7 8 9 |
Width: 140 Height: 40 Left: -4 Top: 20 Font: Lucida Console Font Size: 16 Text Color: RGB(100,150,200) QuickEdit Mode: Enabled |
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?
Answer:
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
.