Tommy Maynard
Blogs, Articles, and Posts
A PowerShell Recursive Function
(powershell.org)
I was recently in a position where I was asked to provide an example of a PowerShell recursive
By: Tommy Maynard submitted:Jun 15 2022
I was recently in a position where I was asked to provide an example of a PowerShell recursive
function. Unfortunately, I didn't have time to do that as it was a part of a written, and timed, test. Sadly, I didn't even really have time to review the other 50-some answers I had already provided. I mostly knew that might happen.
By: Tommy Maynard submitted:Jun 15 2022
Adding a Help Parameter to a Function
(tommymaynard.com)
I started writing a PowerShell function to replicate the work of an old executable called ICSWEEP.
By: Tommy Maynard submitted:Dec 16 2022
I started writing a PowerShell function to replicate the work of an old executable called ICSWEEP.
ICSWEEP "is a command-line utility to clear the Temporary Internet Files Cache and/or the TEMP files folder of ALL user profiles that are NOT in use when this command is executed." ICSWEEP Information.
By: Tommy Maynard submitted:Dec 16 2022
Background Jobs and Recursive Functions
(tommymaynard.com)
I recently had a thought: I have not written much on background jobs over the last nearly eight
By: Tommy Maynard submitted:Jun 16 2022
I recently had a thought: I have not written much on background jobs over the last nearly eight
years. I should do more of that.
By: Tommy Maynard submitted:Jun 16 2022
Changes to Invoke-RestMethod in PowerShell 7
(tommymaynard.com)
As we continue, do keep in mind that Invoke-RestMethod can do much more than what we've seen so far,
By: Tommy Maynard submitted:Jun 15 2022
As we continue, do keep in mind that Invoke-RestMethod can do much more than what we've seen so far,
and what we'll cover. It can do POST requests, handle pagination, handle multipart/form-data, and it can pass in multiple headers if required. Don't forget about authentication and credentials; it can handle those, as well.
By: Tommy Maynard submitted:Jun 15 2022
Clear Host Deconstructed
(tommymaynard.com)
Sometimes, just sitting inside my console, I issue a few consecutive commands, and suddenly, I have
By: Tommy Maynard submitted:Jun 16 2022
Sometimes, just sitting inside my console, I issue a few consecutive commands, and suddenly, I have
something worth sharing. Recently, as I prepared to work with something other than PowerShell, I cleared the host. It's a common occurrence - probably for us both, even. After doing so, I decided to take a closer look at the command I had just issued.
By: Tommy Maynard submitted:Jun 16 2022
Dynamic PowerShell Version in Windows Terminal Tabs
(tommymaynard.com)
I find myself inside the Window Terminal's JSON Settings file each time I update the version of
By: Tommy Maynard submitted:Jun 16 2022
I find myself inside the Window Terminal's JSON Settings file each time I update the version of
PowerShell on my system. That includes non-preview and preview versions of PowerShell. Well, as of today, that's changed. Previously I would install an updated version, jump into the JSON Settings file, and modify the Name and TabTitle properties of the corresponding profile. I've long wanted the version number on the Tab and so I was hard coding the values. No longer.
By: Tommy Maynard submitted:Jun 16 2022
Extract LAPS Passwords and BitLocker Keys from Active Directory
(tommymaynard.com)
The below PowerShell can be used to extract LAPS Passwords and BitLocker Keys from Active Directory.
By: Tommy Maynard submitted:Jul 26 2024
The below PowerShell can be used to extract LAPS Passwords and BitLocker Keys from Active Directory.
This was written on Friday, July 19, 2024, due to the CrowdStrike Outage. If you choose to test this PowerShell, ensure that you update the argument for the SearchBase parameter to reflect your Active Directory domain.
By: Tommy Maynard submitted:Jul 26 2024
It Begins – Azure with PowerShell I
(tommymaynard.com)
So, I am beginning my journey into Azure, alongside PowerShell. Or just maybe, I have that
By: Tommy Maynard submitted:Jun 16 2022
So, I am beginning my journey into Azure, alongside PowerShell. Or just maybe, I have that
backwards: My journey into PowerShell, alongside Azure.
By: Tommy Maynard submitted:Jun 16 2022
Let’s Learn the Get-FileHash Command
(tommymaynard.com)
Someone, somewhere, sent me down a path. At the end of it, while it is not where I needed to be, I
By: Tommy Maynard submitted:Jun 16 2022
Someone, somewhere, sent me down a path. At the end of it, while it is not where I needed to be, I
learned - or relearned rather - about the Get-FileHash cmdlet.
By: Tommy Maynard submitted:Jun 16 2022
Modifying the New-Guid Cmdlet
(tommymaynard.com)
I'm deep in the weeds right now writing new content about my experience with Azure and Azure
By: Tommy Maynard submitted:Jun 15 2022
I'm deep in the weeds right now writing new content about my experience with Azure and Azure
PowerShell. So, what a better time to have an idea, write a quick function, and then create its own post and publish it. Or, maybe not.
By: Tommy Maynard submitted:Jun 15 2022
PowerShell’s Get-Date FileDateTime for Safe Filenames
(tommymaynard.com)
This article covers using PowerShell's Get-Date cmdlet and its FileDateTime format option to create
By: Tommy Maynard submitted:Jun 15 2022
This article covers using PowerShell's Get-Date cmdlet and its FileDateTime format option to create
safe filenames that include the date and time. If you're just starting this post now, then head over to PowerShell.org to read the beginning of this article. Otherwise, continue reading below.
By: Tommy Maynard submitted:Jun 15 2022
Put the Alias Description Property to Work
(tommymaynard.com)
I use a small handful of my own PowerShell aliases and of course some of those included with
By: Tommy Maynard submitted:Jun 16 2022
I use a small handful of my own PowerShell aliases and of course some of those included with
PowerShell natively. There is a best practice around aliases in PowerShell, and that is to not use them in anything that is going to live longer than a one-time use.
By: Tommy Maynard submitted:Jun 16 2022
Saving Time with Background Jobs
(tommymaynard.com)
If you're like me, there's something you know a decent amount about regarding PowerShell, but you
By: Tommy Maynard submitted:Jun 16 2022
If you're like me, there's something you know a decent amount about regarding PowerShell, but you
just don't get to use it much. Today, it's PowerShell background jobs. If you've been reading my blog currently, then you know I'm right in the middle of a series regarding Splunk. In the series, I'm sending telemetry data from my function template to Splunk. The problem, although slight, is that it's increased the duration, or length of time, the function takes to complete. No surprise. It's running several additional commands where it polls the user and system for information. It's only adding maybe a second more of time to the duration of the function. Still, why not determine if it's time that can be reclaimed. Enter background jobs.
By: Tommy Maynard submitted:Jun 16 2022
To Rename a PowerShell Variable
(tommymaynard.com)
I had one of those thoughts. you know, a dumb one. As dumb as it might be, it gave some brief
By: Tommy Maynard submitted:Jun 16 2022
I had one of those thoughts. you know, a dumb one. As dumb as it might be, it gave some brief
inspiration to try something new.
By: Tommy Maynard submitted:Jun 16 2022
Using PowerShell for Docker Confidence
(tommymaynard.com)
As I get deeper into Docker I thought that there might be some people out there with an
By: Tommy Maynard submitted:Jun 16 2022
As I get deeper into Docker I thought that there might be some people out there with an
understanding of PowerShell, that could use it to feel comfortable looking at Docker closer. So, that's who this is for.
By: Tommy Maynard submitted:Jun 16 2022
Projects, Scripts, and Modules
Invoke-RestMethod with a SOAP API
(tommymaynard.com)
In the past, I have absolutely written PowerShell to interact with REST (REpresentational State
By: Tommy Maynard submitted:Jun 16 2022
In the past, I have absolutely written PowerShell to interact with REST (REpresentational State
Transfer) APIs. What I haven't done until now, is interact with SOAP (Simple Object Access Protocol) APIs. The below example is a mostly full-featured PowerShell function.
By: Tommy Maynard submitted:Jun 16 2022
Fun
PowerShell Painting
(tommymaynard.com)
Sorry this was just too cute not to share!
By: Tommy Maynard submitted:Jun 16 2022
Sorry this was just too cute not to share!
By: Tommy Maynard submitted:Jun 16 2022