technology

Powershell, Azure Automation and DevOps – Just The Links

Doing some work with a customer around Azure Automation. Here’s some links and resources that I’ve found very helpful as I’m levelling up. Powershell is tried and true and for customers that use scripting / runbooks for building out infrastructure, you don’t have to leave CI/CD at the door. I love the DevOps stack here around YAML pipelines in ADO, Pester, package management, full auditing and rollbacks. I’ll be adding to this over the next few weeks but I’d love your thoughts and additions.

  • There’s a series that Andrew wrote on this that I quite like. Here’s one on accessing a private Powershell repo from Azure Pipelines for example. Another, more complete example, this repo (link here)uses the Pester test framework – written in Powershell! It also uses PSScriptAnalyzer to check for coding standards (in this case just static code analysis). The project is built using InvokeBuild. All build dependencies handled by PSDepend, and Azure Pipelines perform all the tasks around test / build / publishing (see azure-pipelines.yml). With ADO you can use Azure Artifacts to host a private or public PS repository for your modules (samplemodule.nuspec). This is how you get rollbacks etc.
  • Andrew did the best writeup I’ve seen yet on DevOps in Powershell. (this is Mar 2020 but all still valid). This includes
    • Version control with GitHub or Azure Repos.
    • Test automation – we at MSFT favor Pester. Including code coverage analysis (which can be published with each build as a Publish Test Results Task in Nunit format)
    • PSScriptAnalyzer for static code analysis and even custom rules
    • InvokeBuild (or psake) for build.
    • Package Management – use PSDepend to track project dependencies in a simple PS data file.
    • Documentation using PlatyPS – and I think GH Copilot can greatly help us here as well.
    • CI/CD using Azure Pipelines to fire off a Powershell task (or Azure Powershell task for Azure environment runs). (This used in conjunction with INvokeBuild)
    • Artifact Management for reusability. (NOTE I think this is 300 level stuff. We have to walk before we can run!)

GitHub Copilot Fundamentals – Just The Links

Here’s some links that might help you as you start working more with GitHub Copilot. This pairs with the GitHub Fundamentals course I’m teaching this year. The three main refs I like to point to during the class are Refactoring code (GitHub Docs), Modernizing legacy code with GitHub Copilot (GHD), and this interesting rewrite of a Perl script to Typescript.

And on the advanced topics – see the links below around GitHub MCP Server, Prototyping, and Custom Instruction Files. OMG, such good stuff…

Refactoring Code

  • Github has an excellent cookbook that has outstanding prompt suggestions. Things like improving code readability, performance, refactoring data access layers – the works.
  • Probably the best aspect is the ability to refactor, as you go, without interrupting your flow. Another good reference by Github here walks us through it.
  • For performance optimization, I love this article in the perf optimization section of the cookbook.
  • Now for some Microsoft links – the Azure Developer blog discusses how to analyze and suggest improvements around a selected block of code.

Testing

  • GitHub’s docs around testing are excellent. Testing is like eating your vegetables – we all could do more of it, yet we don’t! That kind of tedious, repetitive work is exactly what Copilot excels at.
  • MSLearn has a nice series around building a better test suite, end to end. I especially loved this blog article around testing. It’s comprehensive and covers best practices so well.
  • How can Copilot help with debugging, exception handling and testing? A very nice video, about 11 minutes long, from Harshada Hole from the Visual Studio team.

Documentation

Deployment and Operations

Instruction Files and Custom Responses

MCP Server

  • A full list (curated by GitHub) of MCP Servers. Very similar (if not parallel?) to Microsoft’s. Starting here to show what’s possible wouldn’t be a bad idea for a demo.
  • GitHub’s MCP Server. Repository Management, PR automation, CI/CD workflow intelligence to analyze build failure. A simple extension in VS Code -if allowed by policy. (walk thru text here). There’s a list of installs for other MCP hosts (Windsurf, Cursos, Jetbrains, VS, Eclipse, Claude). For more documentation if you’re getting stuck on authentication with remote servers, see this link.
  • Starting out, follow this example from GH. A very detailed walkthru that should get you to where you can use GitHub’s remote MCP server for Copilot – things like creating a new issue, listing pull requests, etc. Walks you through Oauth / PAT authentication as well.
  • If you are a video learner, I like this 10 minute overview from Andrea Griffiths / Toby Padilla.

Translation

Prompt Engineering

Prototyping and Proofs of Concept

Other Stuff