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…


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…


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…


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…


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):…


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…


PowerTip: Ensure that errors in PowerShell are caught

Summary: Here’s how to make sure your errors get caught with Try Catch Finally.    Hey, Scripting Guy! I’ve been trying to use the Try Catch Finally, but some of my errors aren’t getting caught. What could be the cause?    For Try Catch Finally, you need to make sure the error defaults to a…


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

Summary: Use Windows PowerShell to access the Cognitive Services Text-to-Speech API. Q: Hey, Scripting Guy! I was reading up on how we could use PowerShell to communicate with Azure to gain an access token. I’ve been just itching to see how we can use this! Would you show us some examples of this in use…


Run PowerShell code in Puppet

Summary: Hi everyone, Dan Franciscus here. I’m a systems engineer and freelance technical writer based out of New Jersey. My expertise is in Windows Server, PowerShell, VMware, and Puppet. Puppet is an infrastructure platform that helps automate your environment. While Puppet has a large Linux user base, it also supports the configuration of Windows systems….