PowerShell

Visualising your IP Address using PowerShell and AI

A few weeks back the Microsoft AI Tour was in Sydney Australia. There was a plethora of great content associated with the wave of everything AI that we are currently in.

I gave a quick-fire series of live demos in a theatre session titled PowerShell & ChatGPT – How to Automate Your Way to Generative AI Brilliance.

The live demos use PowerShell to make web requests and leverage the PowerShellAI PowerShell Module and showed how to leverage Azure OpenAI with PowerShell to;

  • Programmatically get data from OpenAI and work with the results. The demo showed querying OpenAI for the Australian States and Territories returning the results as JSON, converting to a PowerShell Object then querying OpenAI again to get the population of each State and Territory.
  • Create a PowerShell Function that takes a date object as input and calculates the number of days until that date from today
  • Visualise your IP Address. Get your public IP address from http://ipinfo.io that also provides the city location. Query https://api.openweathermap.org for today’s forecast. Then use OpenAI to determine what is the most iconic landmark with a brief description of it for the associated city. Then refine the description of the landmark into 30 words detailing only its key architectural features.
    • Finally using Azure OpenAI Dall-e generate an image in the style of a famous artist (e.g Picasso) of the famous landmark in the associated city with the current weather (e.g. Sunny, Rain, Cloudy).
  • Get a list of the top 5 beers in Australia as JSON, convert to a PowerShell Object and then put the results into an Excel spreadsheet. The later part of this demo uses the ImportExcel PowerShell Module.

The PowerShellAI module cmdlet to leverage Azure OpenAI Dall-e is a new cmdlet that I wrote and submitted as a pull request which has now been incorporated into version 0.97 of the module. To get started with the PowerShellAI Module start with this post.

The example scripts are here in this GitHub repo.

Darren Robinson

Bespoke learnings from a Microsoft Identity and Access Management Architect using lots of Microsoft Identity Manager, Azure Active Directory, PowerShell, SailPoint IdentityNow and Lithnet products and services.

Recent Posts

EntraPulse – Your AI-Powered Gateway to Microsoft Graph & Docs

Today, I’m super excited to finally announce the Beta release of EntraPulse Lite – a…

2 months ago

Lokka MCP Authentication Enhancements

I'm excited to share some significant authentication enhancements I've contributed to the Lokka MCP Server…

3 months ago

AI Inception: Building AI Solutions with AI for AI

Last month I had the pleasure of speaking at the Sydney event for Global Azure.…

3 months ago

A Have I Been Pwned MCP Server for Claude

Model Context Protocol (MCP) is a powerful framework that extends AI clients like Claude and…

5 months ago

Azure AI Developer Hackathon

I've just completed participating in the Azure AI Developer Hackathon that was looking to provide…

5 months ago

Dynamics 365 CE (Sales, CRM) IAM PowerShell Module

Updated: July 2025 v1.0.2 Fixes issue setting D365SalesGlobals enabling session management for D365 Sales API…

6 months ago

This website uses cookies.