{
"$type": "site.standard.document",
"content": {
"$type": "blog.pckt.content",
"items": [
{
"$type": "blog.pckt.block.image",
"attrs": {
"align": "center",
"alt": "The PowerShell Wiggum loop is easy to understand.",
"blob": {
"$type": "blob",
"ref": {
"$link": "bafkreicj4y4utrgrvyd3zmovsrk3byumbxkdwqpwvobooody7zbiz6hopa"
},
"mimeType": "image/gif",
"size": 310142
},
"src": "blob:bafkreicj4y4utrgrvyd3zmovsrk3byumbxkdwqpwvobooody7zbiz6hopa"
}
},
{
"$type": "blog.pckt.block.text",
"facets": [
{
"features": [
{
"$type": "blog.pckt.richtext.facet#italic"
}
],
"index": {
"byteEnd": 86,
"byteStart": 78
}
}
],
"plaintext": "One of the best things about PowerShell is that you can interactively explore anything. Long before the Wiggum Loop was a thing, PowerShell let you explore interactively with prompting. Here's how you can embody the spirit of Ralph Wiggum and find your way around PowerShell."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "All parts of the PowerShell Wiggum Loop are as old as PowerShell itself."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "To be fair, the Simpsons did it first (1989)."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "PowerShell did it second (2006)."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "Generative AI came a lot later (~2020)"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "We used to call this many things that didn't imply you were an idiot. I'm calling this the \"PowerShell Wiggum Loop\" now only to make it easier to understand."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "We used to call it:"
},
{
"$type": "blog.pckt.block.heading",
"level": 2,
"plaintext": "The Trinity of Discoverability"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "Three commands help you find your way around PowerShell."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "They are:"
},
{
"$type": "blog.pckt.block.bulletList",
"content": [
{
"$type": "blog.pckt.block.listItem",
"content": [
{
"$type": "blog.pckt.block.text",
"plaintext": "Get-Command"
}
]
},
{
"$type": "blog.pckt.block.listItem",
"content": [
{
"$type": "blog.pckt.block.text",
"plaintext": "Get-Help"
}
]
},
{
"$type": "blog.pckt.block.listItem",
"content": [
{
"$type": "blog.pckt.block.text",
"plaintext": "Get-Member"
}
]
}
]
},
{
"$type": "blog.pckt.block.heading",
"level": 4,
"plaintext": "Get-Command"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "PowerShell commands tend to be named with verb-noun pairs. Most people try to be as obvious as possible."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "With that in mind, getting commands is pretty obviously named. To Get commands in PowerShell, you just run:"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Command"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "We can get the syntax for a command with -Syntax"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Command Get-Command -Syntax\n"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "We can find all commands from a module with -Module."
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Command -Module Microsoft.*"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "We can also get all commands of a -Verb. Let's get all the gets:"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Command -Verb Get"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "We can also look for nouns. Let's get all the -Module commands:"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Command -Noun Module"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "And of course, we just search by wildcard:"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Command Get*"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "Any non-script file is considered an Application. To see if ffmpeg is installed and in our path, we can use:"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Command ffmpeg* -CommandType Application"
},
{
"$type": "blog.pckt.block.heading",
"level": 3,
"plaintext": "Get-Help"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "Continuing the obvious naming pattern, to get help we can:"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Help"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "There are two types of help built into PowerShell: commands and topics."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "Most topics are prefixed with about_. To see all of these \"about\" topics, we run:"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Help about_*"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "Now let's get help about Get-Help"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Help Get-Help"
},
{
"$type": "blog.pckt.block.text",
"facets": [
{
"features": [
{
"$type": "blog.pckt.richtext.facet#italic"
}
],
"index": {
"byteEnd": 58,
"byteStart": 52
}
}
],
"plaintext": "All commands should have help (it may not always be great help, but some help is better than none)."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "We can always work with help consistently. For example, if we wanted to get examples for Get-Help, it's just:"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Help Get-Help -Examples"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "If we wanted to see all of the parameter help, it's:"
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Help Get-Help -Parameter *"
},
{
"$type": "blog.pckt.block.heading",
"level": 3,
"plaintext": "Get-Member"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "Last but not least, let's talk about objects."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "PowerShell has a very flexible base object. You can dynamically add properties or methods to anything, or use any .NET class and enjoy all the functionality it has to offer."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "The methods, properties, and events that make up an object are called it's \"members\"."
},
{
"$type": "blog.pckt.block.text",
"plaintext": "So if we want to see the members of a bunch of objects, just pipe them to Get-Member:"
},
{
"$type": "blog.pckt.block.text",
"plaintext": ""
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "Get-Command | Get-Member"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "This shows us each method, property, and event available on each type of command object."
},
{
"$type": "blog.pckt.block.text",
"plaintext": ""
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "{\"hello world\"} | Get-Member"
},
{
"$type": "blog.pckt.block.text",
"plaintext": ""
},
{
"$type": "blog.pckt.block.codeBlock",
"attrs": {
"language": "powershell"
},
"plaintext": "{\"hello world\"}.Ast | Get-Member"
},
{
"$type": "blog.pckt.block.text",
"plaintext": ""
},
{
"$type": "blog.pckt.block.heading",
"level": 3,
"plaintext": "Conclusion"
},
{
"$type": "blog.pckt.block.text",
"plaintext": "Long before the \"Wiggum Loop\" existed for AI, PowerShell has had it's own ways to simply FAFO with any object. Exploration is a key part of the language."
},
{
"$type": "blog.pckt.block.text",
"facets": [
{
"features": [
{
"$type": "blog.pckt.richtext.facet#bold"
}
],
"index": {
"byteEnd": 133,
"byteStart": 114
}
}
],
"plaintext": "You may be much smarter than Ralph Wiggum, but you don't have to be a genius to find your way around PowerShell. Anyone can explore."
},
{
"$type": "blog.pckt.block.text",
"facets": [
{
"features": [
{
"$type": "blog.pckt.richtext.facet#bold"
}
],
"index": {
"byteEnd": 9,
"byteStart": 0
}
}
],
"plaintext": "Have Fun!"
}
]
},
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreidm4kk2ofgor7ausmmtfug4j64ufo66wjqvb4sx37x6busrm7w3eu"
},
"mimeType": "image/gif",
"size": 314876
},
"description": "One of the best things about PowerShell is that you can interactively explore anything. Long before the Wiggum Loop was a thing, PowerShell let you explore interactively with prompting. Here's how you can embody the spirit of Ralph Wiggum and find your way around PowerShell. All parts of the PowerShell Wiggum Loop are as old as PowerShell itself. To be fair, the Simpsons did it first (1989).",
"path": "/the-powershell-wiggum-loop-stez852",
"publishedAt": "2026-02-01T21:15:50+00:00",
"site": "at://did:plc:hlchta7bwmobyum375ltycg5/site.standard.publication/3mdfcro5xe273",
"tags": [
"PowerShell",
"Intro"
],
"textContent": "One of the best things about PowerShell is that you can interactively explore anything. Long before the Wiggum Loop was a thing, PowerShell let you explore interactively with prompting. Here's how you can embody the spirit of Ralph Wiggum and find your way around PowerShell.\nAll parts of the PowerShell Wiggum Loop are as old as PowerShell itself.\nTo be fair, the Simpsons did it first (1989).\nPowerShell did it second (2006).\nGenerative AI came a lot later (~2020)\nWe used to call this many things that didn't imply you were an idiot. I'm calling this the \"PowerShell Wiggum Loop\" now only to make it easier to understand.\nWe used to call it:\nThe Trinity of Discoverability\nThree commands help you find your way around PowerShell.\nThey are:\nGet-Command\nGet-Help\nGet-Member\nGet-Command\nPowerShell commands tend to be named with verb-noun pairs. Most people try to be as obvious as possible.\nWith that in mind, getting commands is pretty obviously named. To Get commands in PowerShell, you just run:\nGet-Command\nWe can get the syntax for a command with -Syntax\nGet-Command Get-Command -Syntax\n\nWe can find all commands from a module with -Module.\nGet-Command -Module Microsoft.*\nWe can also get all commands of a -Verb. Let's get all the gets:\nGet-Command -Verb Get\nWe can also look for nouns. Let's get all the -Module commands:\nGet-Command -Noun Module\nAnd of course, we just search by wildcard:\nGet-Command Get*\nAny non-script file is considered an Application. To see if ffmpeg is installed and in our path, we can use:\nGet-Command ffmpeg* -CommandType Application\nGet-Help\nContinuing the obvious naming pattern, to get help we can:\nGet-Help\nThere are two types of help built into PowerShell: commands and topics.\nMost topics are prefixed with about_. To see all of these \"about\" topics, we run:\nGet-Help about_*\nNow let's get help about Get-Help\nGet-Help Get-Help\nAll commands should have help (it may not always be great help, but some help is better than none).\nWe can always work with help consistently. For example, if we wanted to get examples for Get-Help, it's just:\nGet-Help Get-Help -Examples\nIf we wanted to see all of the parameter help, it's:\nGet-Help Get-Help -Parameter *\nGet-Member\nLast but not least, let's talk about objects.\nPowerShell has a very flexible base object. You can dynamically add properties or methods to anything, or use any .NET class and enjoy all the functionality it has to offer.\nThe methods, properties, and events that make up an object are called it's \"members\".\nSo if we want to see the members of a bunch of objects, just pipe them to Get-Member:\nGet-Command | Get-Member\nThis shows us each method, property, and event available on each type of command object.\n{\"hello world\"} | Get-Member\n{\"hello world\"}.Ast | Get-Member\nConclusion\nLong before the \"Wiggum Loop\" existed for AI, PowerShell has had it's own ways to simply FAFO with any object. Exploration is a key part of the language.\nYou may be much smarter than Ralph Wiggum, but you don't have to be a genius to find your way around PowerShell. Anyone can explore.\nHave Fun!",
"title": "The PowerShell Wiggum Loop",
"updatedAt": "2026-05-12T19:24:06+00:00"
}