Powershell有趣的发声 2


支持所有PS版本

创作PS代码是非常有趣的,但是有时确不一样。这里有个函数能让你的PS变得有趣。只需打开你的声音,你将能听到从PS中发出的不同声音。

function prompt 
{
  $text='You are great!','Hero!','What a checker you are.','Champ, well done!','Man, you are good!','Guru stuff I would say.', 'Youaremagic!'
  $host.UI.RawUI.WindowTitle=Get-Location
 (New-Object -ComObject Sapi.SpVoice).Speak(($text|Get-Random)) | out-null
}

原文地址: Have PowerShell Cheer You Up!

本文链接: https://www.pstips.net/have-powershell-cheer-you-up.html
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!

发表评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注

2 条评论 “Powershell有趣的发声