Thursday, October 6, 2011

PowerShell | The PowerShell Song


function Out-Text {
param(
[Parameter(Mandatory=$true)]
$Text,

[switch]
$Drunk
)

$object = New-Object -ComObject SAPI.SpVoice
if ($drunk) { $object.Rate = -10 }
$object.Speak($text) | Out-Null
}

Out-text "hi tiago duarte. how are you?"


Check out more cool tips from PowerShell Power Tips

No comments:

Post a Comment