少年是不是觉得这样的 命令行 看的不甚清晰
高亮显示所有所有命令
一键换色你值得拥有
Prerequisites (Windows only)
Before you’re able to run PowerShell scripts on your machine, you need to set your local ExecutionPolicy to RemoteSigned (Basically anything except Undefined and Restricted). If you choose AllSigned instead of RemoteSigned, also local scripts (your own) need to be digitally signed in order to be executed. With RemoteSigned, only Scripts having the “ZoneIdentifier” set to Internet (were downloaded from the web) need to be signed, others not. If you’re an administrator and want to set it for all Users on that machine, use “-Scope LocalMachine”. If you’re a normal user, without administrative rights, you can use “-Scope CurrentUser” to set it only for you.
> Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Force
Set Color
- 打开powershell
- 运行命令
Set-PSReadLineOption -Colors @{
Command = 'Magenta'
Number = 'Green'
Member = 'Green'
Operator = 'Yellow'
Type = 'Green'
Variable = 'Yellow'
Parameter = 'Yellow'
ContinuationPrompt = 'Green'
Default = 'Green'
}
- 打开 文件
C:\Users\<username>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
,将上述命令写入文件并保存 - 另附微软官方
powershell
配置文档一份