Category: Powershell

Rapidly build Autopilot VMs with Hyper-V and PowerShell!

Picture this scenario – you are at the pointy end of a major modern management project and it’s time to test every policy, configuration and application at scale and quickly. What do you do? With infinite money, infinite time and a willing client, you take over their VC meeting room and stack dozens of devices on a desk and blast slayer while you verify your builds ( this …

Creating Endpoint Security Policies with PowerShell

Keeping up with the rapid momentum of everything in the modern management world is a full time job. It’s exhausting, but it’s also fun. It truly pays to read the “What’s new in Microsoft Intune” on a regular basis. Case in point, late last month, Microsoft announced an updated URL for the Microsoft Endpoint Manager Admin Portal – https://endpoint.microsoft.com, previously https://devicemanagement.microsoft.com. Along with this change to the new …

Replicate your favorite VSCode theme in Windows Terminal

Windows Terminal has been out for around 6 months now and it’s safe to say it’s a huge success.It’s a great way to handle working with multiple terminal applications in one space, and the ability to customize the environment to suit your needs (both aesthetic and functional) make it a perfect tool for anyone who lives in a shell environment for hours on end. I was recently tagged …

Upload files to Azure File Share using PowerShell & Microsoft Flow

I’m a big fan of using Start-Transcript in my application install wrappers as it provides a very neat and tidy way to capture the output of everything that happens during the installation process and as such, all of the applications I package end up storing log files locally and I passionately and repeatedly urge my support staff to view these log files to identify issues during deployment. However, …

Control advanced power settings with PowerCfg & PowerShell

One of the most common questions I get asked about Intune & Modern Device Management is “Would it be possible to do X with Intune?” With the native support to deploy and run PowerShell scripts in either user or system contexts, this allows my answer to always be “Yes! We can do anything you want – you just need to decide on how much time you wish to …

Getting your AAD Tenant Id without authentication!

Another quick post – I’ve been doing some work with silent configuration of OneDrive and the new¬†Known Folder Migration¬†GPO solution all being deployed via Intune for multiple clients. One thing that is required for the KFM solution is the Azure Tenant Id. Being the nerd I am, I wanted to see if I could get the Id without having to log in to the tenant. After a quick …

Set multiple registry values to all users HKCU profiles using PowerShell & Active Setup

This is a quick one – an improvement on an almost perfect script that doesn’t quite work how it should. the script Set-RegistryValueForAllUsers.ps1 found on the TechNet Gallery has one major fault. If you try and apply more than one value at a time, the last applied value is overwritten, leaving you at the end of the script with the last value and nothing else. Very simple change, …

Authenticate to Microsoft Graph in PowerShell in two lines of code!

TWO LINES???!!! you bet!! One of my biggest gripes over the last few years with IT blogs and general talk of working with Azure & PowerShell is how much time is wasted on talking about how to authenticate into Azure\Graph\AAD. I’d suggest it is one of the harder hurdles to getting into the modern DevOps way of working. OAuth & OAuth 2 can be a very daunting thing …