PowerTip: Determine your version of PowerShell and host operating system

Summary:  Identify your PowerShell environment by making use of built-in PowerShell variables.    Hey, Scripting Guy! If I’m writing a script, how can I detect if I am running on Windows, Linux, or Mac with PowerShell?    Just use the built-in variable $PSVersionTable, which has all of the properties you’ll need. Here is an example:…


Windows PowerShell and the Text-to-Speech REST API (Part 5)

Summary: Send and receive content to the Text-to-Speech API with PowerShell. Q: Hey, Scripting Guy! Could you give a buddy a hand in getting the last pieces together for the Text-to-Speech API? —SR A: Hello SR, No problem at all. The last few posts, we dealt with the “Heavy Lifting” (which really wasn’t that heavy):…


PowerTip: Use PowerShell to play WAV files

Summary: Make use of the native features of Windows through PowerShell to play sound.    Hey, Scripting Guy! I’ve got some WAV files I would love to play without launching an application. Is there a way in Windows PowerShell to do this?      You sure can! Using the System.Media.Soundplayer object, you can do this…


Windows PowerShell and the Text-to-Speech REST API (Part 4)

Summary: Send and receive content to the Text-to-Speech API with PowerShell. Q: Hey, Scripting Guy! I was playing with the Text-to-Speech API. I have it almost figured out, but I’m stumbling over the final steps of formatting the SSML markup language. Could you lend me a hand? —MD A: Hello MD, Glad to lend a…