### Text to Speech
$Path = "$env:temp\file.wav"
Add-Type -AssemblyName System.Speech
$synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer
$synthesizer.SetOutputToWaveFile($Path)
$synthesizer.Speak('This is a recording.')
$synthesizer.Speak('Adding more to it')
$synthesizer.SetOutputToDefaultAudioDevice()
# Play back the recorded file
Invoke-Item $Path
### View properties of an object
Get-Process *note* | ConvertTo-Json | Out-File $env:APPDATA\GM.json ; $IE=new-object -com internetexplorer.application ; $IE.navigate2("http://jsonviewer.stack.hu/") ; $IE.visible=$true ; notepad "$env:APPDATA\GM.json"
### Find files modified recently
(Get-ChildItem -Path c:\pstbak\*.* -Filter *.pst | ? {
$_.LastWriteTime -gt (Get-Date).AddDays(-3)
}).Count
### See complete Powershell command history, for all time
notepad (Get-PSReadLineOption).HistorySavePath
### See Powershell command history, for current session
CTRL-R, CTRL-Space, F8, or Get-History |