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
Tag: Azure
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
Harnessing AI in PowerShell: Create a multi-model command-line AI assistant (Part 2)
Prepare the PowerShell scriptScript parametersModel and API parametersModel parametersAPI parametersSet Az ContextUpdate your PowerShell profile scriptLet's chat!Use the defaultsOutput to browserUse different AI modelsInclude token statisticsReview session statisticsStart a new chatReview your chat historyIncrease the max tokens countProvide a context fileSearch the internet with AIChange the system promptSend multiple promptsChange the temperatureConclusion In our last … Continue reading Harnessing AI in PowerShell: Create a multi-model command-line AI assistant (Part 2)
Harnessing AI in PowerShell: Create a multi-model command-line AI assistant (Part 1)
Azure AICreate a projectAdd AI modelsGrant role permissionsMonitoring cost and usageAnthropic AIOpenAIGoogle AIX AIPerplexity AIStoring your API keys in Azure KeyVaultConclusion AI is virtually inescapable these days. From annoying website chat bots to the assimilation of the Microsoft product portfolio by Copilot, AI has been busy spreading its tentacles every which way it can. I … Continue reading Harnessing AI in PowerShell: Create a multi-model command-line AI assistant (Part 1)
Getting an access token for Microsoft Entra in PowerShell using the Web Account Manager (WAM) broker in Windows
Some months ago, in my quest to look at different methods for obtaining an access token interactively for Microsoft Graph in PowerShell, I wrote a simple PowerShell wrapper around the Microsoft.Identity.Client library, aka MSAL.Net - the supported MS library for authenticating with Microsoft Entra. Microsoft's apps and modules have been trending toward using the Web … Continue reading Getting an access token for Microsoft Entra in PowerShell using the Web Account Manager (WAM) broker in Windows
Activating PIM Roles that require MFA or Conditional Access Authentication Context with PowerShell
For some time, I've been activating and scheduling activations for Azure roles under Privileged Identity Management (PIM) using the Microsoft Graph PowerShell SDK. However recently we secured these role activations to require a conditional access authentication context with MFA. This basically requires me to MFA when I activate a role with PIM. Problem is, by … Continue reading Activating PIM Roles that require MFA or Conditional Access Authentication Context with PowerShell