PowerShell 技能连载 - 用 PowerShell 来励志
适用于所有 PowerShell 版本
编写 PowerShell 代码是十分带劲的,但是某些时候会令人感到沮丧。这是一个用 PowerShell 来励志的函数。只需要打开音箱,PowerShell 会在您执行每一条命令之后鼓励你。
function prompt
{
$text = 'You are great!', 'Hero!', 'What a checker you are.', 'Champ, well done!', 'Man, you are good!', 'Guru stuff I would say.', 'You are magic!'
'PS> '
$host.UI.RawUI.WindowTitle = Get-Location
(New-Object -ComObject Sapi.SpVoice).Speak(($text | Get-Random))
}
PowerShell 技能连载 - 用 PowerShell 来励志
http://blog.vichamp.com/2014/08/11/have-powershell-cheer-you-up/