Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Call Operator, Script Block, Invoke Expression und Here String in einer Reihe
#ibjs.net 20169806
Add-Type -AssemblyName System.speech
$Hedda=New-Object `
System.Speech.Synthesis.SpeechSynthesizer
$hedda.SelectVoice(`
($hedda.GetInstalledVoices().voiceinfo|?{$_.name -match "Hedda"}).name)
$GD=@'
$D=get-date
$S="Heute ist {0} der {1} {2} {3}. Es war gerade {4} Uhr und {5} Minuten und {6} Sekunden" -f `
$D.tostring("dddd"),$D.day,$D.tostring("MMMM"),$D.year,$D.hour,$D.minute,$D.second
$Hedda.speak($S)
'@
$Zeitansage={iex $GD}
&$Zeitansage
#Call Operator, Script Block, Invoke Expression und Here String in eier Reihe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.