QuietShell – Executing PowerShell without a Console Window

For some time I've used a simple VBScript wrapper in code projects and scheduled tasks to allow silent execution of PowerShell scripts in the user context without displaying a console window: p = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName) location = p &"\"& WScript.Arguments(0) command = "powershell.exe -nologo -ExecutionPolicy Bypass -File """ &location &"""" set shell = CreateObject("WScript.Shell") shell.Run command,0 … Continue reading QuietShell – Executing PowerShell without a Console Window →

Harnessing AI in PowerShell: Prompting like a Pro

Understanding Effective AI Prompting: Core PrinciplesClarity and SpecificityContext is KingStructured Problem PresentationIterative RefinementError Message InclusionVersion and Environment DetailsPerformance RequirementsSecurity ContextCode GenerationCode Review and OptimizationBest Practices ImplementationThe Art of Iterative PromptingStarting with a Basic PromptRefining Your PromptFollowing UpExtended PowerShell-Specific ExamplesScenario 1: Active Directory User ManagementScenario 2: Performance OptimizationUnderstanding AI's Problem-Solving ApproachAdvanced Prompting TechniquesRole-Based PromptingComparative PromptingEducational PromptingThe … Continue reading Harnessing AI in PowerShell: Prompting like a Pro →

Harnessing AI in PowerShell: Create a TimeZone Script for Windows Autopilot with AI

Get time zone from geolocation dataConvert IANA time zone to Windows time zoneAdd logging, error handling and create a summaryConclusion In this post I want to walk through a real-world example of creating a useable PowerShell script simply by prompting an AI model in conversation. The goal for this script is: to determine the appropriate … Continue reading Harnessing AI in PowerShell: Create a TimeZone Script for Windows Autopilot with AI →

Using the Fluent Theme in WPF with PowerShell and .Net 9

For a long time, adding a modern design theme to your WPF project typically meant adding a 3rd party library to provide the styling, such as MahApps Metro, or WPF UI. With the release of .Net 9, a Fluent theme is finally coming to WPF! There are still areas where 3rd party libraries will be … Continue reading Using the Fluent Theme in WPF with PowerShell and .Net 9 →

Investigating Safeguard Hold 54762729 for Windows 11 24H2

!! UPDATE 2024-11-12 !! Microsoft have now documented this safeguard as well as patching it in the December 10, 2024 Windows updates. Read more about it here. A few days ago I happened to be reviewing our feature update Power BI report and noticed that a number of devices were now being blocked from upgrading … Continue reading Investigating Safeguard Hold 54762729 for Windows 11 24H2 →

Popping Toast Notifications in PowerShell Core

If you've ever popped a toast notification in PowerShell using the Windows Runtime (WinRT), you've probably discovered that, whilst it works fine in PowerShell 5, it doesn't work at all in PowerShell Core (5/6/7+). That's because the WinRT assemblies are not included in PowerShell Core - WinRT is an exclusively Windows thing and PowerShell Core … Continue reading Popping Toast Notifications in PowerShell Core →

Intune Assignments Report

If you've ever wanted to see all of your assigned items in Microsoft Intune in one place, my Intune Assignments report may be your friend 🙂 Using Azure automation, assigned items are exported from Microsoft Graph on a schedule and sent to an Azure storage account in CSV format. A Power BI report connects with … Continue reading Intune Assignments Report →