Hey, Scripting Guy! Blog

Learn about Windows PowerShell
  1. PowerTip: Use PowerShell to pick a random name from a list
    Summary: Using the Get-Random Cmdlet to select a random list of names instead of numbers Hey! Dr. Scripto! I’d like to pick a random name from a list to generate user names in my lab.   Could you show me an example? I’d be delighted to.   Just use an array of names and then add them...
  2. Using PowerShell to create a folder of Demo data
    Summary: Creating sample files with random sizes and dates for use in a Lab Q: Hey, Dr. Scripto! From time to time I like to show “how things works” at User Group meetings and to colleagues.   But I don’t always have a good pile of sample files.   Do you have any examples of how to...
  3. PowerTip: Turn off the power to your computer with PowerShell
    Summary: A simple way to power off your computer by using the Windows PowerShell cmdlets.    Hey, Scripting Guy! I’ve got a script that needs to power off a system after it’s done. How can I accomplish this with PowerShell?    Look no further than the Stop-Computer cmdlet to turn off the power! (How’s THAT...
  4. Parse HTML and pass to Cognitive Services Text-to-Speech
    Summary: Having some fun with Abbott and Costello’s “Who’s on first?” comedy routine, and multiple voices with Bing Speech. ------------------------------- Hello everyone! The last few posts, I showed you all about the Cognitive Services Text-to-Speech API. You learned about the process to authenticate with Windows PowerShell. It was also a great showcase for Invoke-RestMethod, as...
  5. 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:...