I know a lot of people who write software for a living or otherwise live in that world of code, configurations, sprints and backlogs. When I think about using Github Copiot agents for coding (https://stu.monster/mash/2025/05/github-copilot-agent-mode-in-10-minutes/) the usecase is fairly straightforward and understood.
Recently I’ve been using Github Copilot a lot more for tasks that aren’t classically coding at all. Let’s talk today about using Powershell scripts to accelerate our repetitive work tasks.
What is Powershell?
Powershell is a basic script language (computer code, but usually simpler and doesn’t require additional tools) but it’s designed to handle a lot of tasks on a Windows computer or (by using extensions) on a lot of other systems as well. You do not need to understand any more than the preceding sentence about Powershell in order to use it for our purposes today.
How could this “code-y” sounding thing possibly apply to my work tasks
Let’s start with an example. Let’s say that every time you start a new project, you want to build a standardized folder structure on my computer. You could manually use Windows Explorer and mouse through creating multiple folders and subfolders, which can be time-consuming and monotonous. Of, you can get a simple PowerShell script to automate this process. Let’s see how GitHub Copilot can write up that script for us.
i always begin my projects with a predefined folder structure under my Documents\Projects folder. build a single powershell script that prompts for a customer name and project name, then creates the following folder structure
-Customer Name
-- Project Name
--- Contracts
--- Meeting Notes
--- Design Documents
--- Testing

Well… it did write a draft of one, but it wants me to copy and paste it into a new file myself… let’s put the ball back in Copilot’s court

Now Copilot has created the script file and we can even ask Copilot to run it for us right here in VSCode

And here it is prompting me for the customer name.

So we can quickly and easily automate all kinds of tasks that we would normally do manually on our windows machine. Powershell is just one of the ways to do this but a good starting point because it’s not compiled code and it remains fairly readable.
Let’s increase complexity a bit
That example was a fairly simple one, although definitely a real business use case. Here’s another one that’s more complex and has Powershell calling on additional tools:
I often have to help out with managing setting up Azure resources for a new project. Usually this means going to the https://portal.azure.com page and logging in, then clicking around to find the correct resource and supplying all the configuration info.

This is not difficult, but it is tedious and certainly a repetitive task. As we’re looking to empower more of our developers with their own AI Sandbox development environment… I may need to do this several related tasks time and again for each developer that needs access. Now I need to add one more specific tool to my computer in order to work with resources in the Azure cloud — The Azure CLI toolkit — https://learn.microsoft.com/en-us/cli/azure/?view=azure-cli-latest.
The Azure CLI toolkit is essentially a program that lives on our computer that lets us manage Azure resources by typing in commands on the command line.
Getting Started
Prompt below. This gets a little more complex than before because there are more moving pieces… As usual, we want to outline the scenario that we’re working with and provide the specific requirements.
i manage sandbox environments in azure for our AI development. i have owner permission on a particular azure subscription but i have to access it with PIM request
build a single powershell that uses azure cli to perform these tasks
1. login as me
2. execute the PIM request
3. deploy azure cognitive services such as document intelligence and azure openAI endpoints as requested
4. make sure that the specified user can access these resources
5. write up connection details memo for that user (doesn't need to send automatically)
So the Github Copilot did a decent job here of writing out a single script that performs these tasks. I noticed the very first time that I ran it we got some errors back but the CLI provided the reason

We are missing a flag in the cognitiveservices account deployment process. We can just supply this error message back to the Github Copilot and let it figure out how to fix the mistake.
We’ve discussed debugging with Github Copilot before, but you simple iterate until you’re happy with the output. Feed any confusing messages or errors back to the Copilot and it will help you understand where your Powershell went wrong.
Wrap
So these examples are just two things that I regularly have to do on my computer that I might have scripted in the past… but it’s so easy to script now with Github Copilot. I’m looking at a lot of manual tasks now and trying to see which ones are automatable in the future.