Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

PowerTip: Create new authentication keys for AzureRM Cognitive Services

Summary: Change the keys to authenticate to Azure RM Cognitive Services, by using Windows PowerShell. (image)   Hey, Scripting Guy! I created the keys for my Rest API. I know I can change them in the web portal, but is there a faster way of doing it through Windows PowerShell? (image)   There absolutely is! Just use the New-...

Windows PowerShell and the Azure Text-to-Speech Rest API (Part 1)

Summary: You can use Windows PowerShell to authenticate to the Microsoft Cognitive Services Text-to-Speech component through the Rest API. Q: Hey, Scripting Guy! I heard about the cool Microsoft Cognitive Services, and had heard they have a REST API. Does that mean I can use PowerShell to consume them? Could you show me how to authenticate ...

PowerTip: Use PowerShell to read an RSS feed

Summary: “Hey, Scripting Guy!” shows you how to use Invoke-RestMethod to read a list of entries from an RSS feed. (image)  How can I use Windows PowerShell to see the list of articles from an RSS feed?    (image)   Just use the Invoke-RestMethod and provide the full path to the link to the RSS feed. Here is an example:    Invoke-...

PowerShell and the REST API for the IT pro

Summary: This post provides a quick introduction to what the REST API is, and how it applies to Windows PowerShell. Q: Hey, Scripting Guy! I can see there is this cool cmdlet called Invoke-RestMethod. I've been told REST API's are all around, and this allows me to consume that data. Could you give me a hand getting started? —SH A: Hello SH...

PowerShell for Programmers: How to write a function the right way

Just like I mentioned in my first post, PowerShell supports a lot of stuff that makes it pretty easy to dive in and get stuff running. The following two examples are supported in PowerShell, but not something you should really be doing for any reusable tool set. Putting your parameters (arguments) next to the function name in parenthesis ...