Posts

  • Recent Posts for Hugo Coder

    Here’s how I added a ’latest posts’ list on my home page!
  • Get Planner Data with PowerShell Universal

    Recently, the Graph team introduced the ability to access Planner as an application, rather than as a human. That means we were able to give PowerShell Universal the ability to read plans, tasks etc and surface them as an API endpoint.
  • One-Time File Downloads in ASP.NET

    A trick for downloading files from your secure ASP.NET Web API.
  • Start-ChinWag in PowerShell

    Recently, my manager was experimenting with the idea of randomly touching base with people in the business through the day as a way to keep engaged when working remotely. Not content with a manual process, he was tinkering with a PowerShell script to get the members of an Active Directory group, choose someone at random, and start a Teams call using the callto: protocol.
  • View on GitHub Link for Hugo Coder

    I wanted a “View on GitHub” link on this blog so you could quickly view the source code for any post. Here’s how I did it!
  • Random Sample of AD Users in PowerShell

    We had a situation at work recently where we needed to gradually roll out a change to our Active Directory user accounts, and we wanted to make sure we got a random sample from across the organisation for each “ring” of the deployment.
  • Entity Framework Migrations from GitHub Actions

    So you have an app using Entity Framework that you’re deploying using GitHub Actions, and you want to use Migrations to keep your database up to date.
  • Calling MS Graph from ASP.NET on Azure

    In my last post I talked about calling Microsoft Graph endpoints using an Azure managed identity from PowerShell Universal. This post is about doing the same thing from an ASP.NET web application on .NET 6.
  • Calling MS Graph from PSU on Azure

    The Microsoft.Graph PowerShell module wraps up all the Graph endpoints in PowerShell functions, but for security reasons, the Connect-MgGraph function doesn’t allow for stored (secret) credentials. However, since we host PowerShell Universal as an Azure App Service, and we have a managed identity for that app service, we can connect to Graph as the app!
  • PowerShell Universal Startup Script

    I’ve been playing with PowerShell Universal for almost a year now, and I thought this would be a great place to share some tips, tricks and scripts that have helped me out. And what better place to start than the initialize.ps1 script? That’s the script that runs right before the PSU server starts. The script lives in the .universal folder inside your Repository folder, so create it if it doesn’t exist already.