• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Think PowerShell

Think PowerShell

PowerShell for IT Pros

  • About
    • Who I Am
    • Why I Blog
    • Privacy Policy
  • Resources
    • More PowerShell Sites
    • Post Series Index
  • Get Help
  • Show Search
Hide Search

.NET

Test PowerShell Variable for Null, Empty String, and White Space

Aaron Rothstein · October 25, 2017 · 7 Comments

Learn the difference between a null, empty string, and white space value for a PowerShell variable and how to test for them.

PowerShell variables without “value”

More often than not, we create variables with the intent they will hold a value. We typically then choose to act upon that value. Therefore, if a variable doesn’t have value, this is something we would want to check against in our conditional logic flow.

[Read more…] about Test PowerShell Variable for Null, Empty String, and White Space

Create Cortana Audio Files From Text Using PowerShell

Aaron Rothstein · July 17, 2017 · 2 Comments

A WAV file generated from PowerShell.

Use Windows 10’s Text-to-Speech capability and Cortana’s voice to create WAV audio from within a PowerShell script.

Finding a Universal Voice: A Universal Problem

Have you ever called a support line and had to listen to a bunch of different recorded scripts, also known as “prompts”? The prompts may be the voice of a single person or a combination of different people (maybe the original voice left the company). There may be feedback noise on the recording. The speaker may have tripped over a word but decided not to record the prompt over again. Maybe the speaker had a cold one the day of recording. All of these factors can create an inconsistent user experience when interacting with the call prompts. If that weren’t enough, it takes TIME to record prompts manually! The more you have the longer it will take, even if you get every recording right on the first try.

Wouldn’t it be great if there was a way to audio files with a consistent voice, and in an efficient manner? We can, with PowerShell and Windows 10’s Text-to-Speech capability, powered by the .NET class SpeechSynthesizer.

[Read more…] about Create Cortana Audio Files From Text Using PowerShell

Primary Sidebar

Aaron

Think PowerShell

Copyright © 2025 · Monochrome Pro on Genesis Framework · WordPress · Log in