Griff Barker's Avatar

Griff Barker

@griff.systems.bsky.social

Husband, systems engineer, pretend blogger, all-around-nerd, Corgi haver, player of badminton and racquetball. The code I write almost usually works. #PowerShell #SystemsEngineering #IT #DataPrivacy πŸ”— https://griff.systems/socials Statements are my own.

208 Followers  |  498 Following  |  882 Posts  |  Joined: 23.11.2024  |  1.8903

Latest posts by griff.systems on Bluesky

1. Run the script.
2. Re-run hybrid conf wizard if applicable, with only the OAuth checkbox filled.
3. Recycle the OWAApp and ECP IIS app pools in IIS on your Exchange servers.
4. Restart the Exchange service host service.

Works a charm. Forever thankful to the Exchange team for their tools! (2/2)

08.08.2025 04:44 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
MonitorExchangeAuthCertificate - Microsoft - CSS-Exchange

If you've ever had your Exchange server's auth cert get messed up or expire and can no longer access ECP, Microsoft has this nifty PowerShell script that can reset it for you. Run the script to replace the cert, using the flag to ignore hybrid environment if you have a hybrid environment... (1/2)

08.08.2025 04:44 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

[🧠]$integer

07.08.2025 03:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Man, who DOESN’T have β€œfuture of work” or β€œthought leader” in their LinkedIn bio now?

I’m adding β€œfuture of chilling” and β€œdouble meat at Chipotle” to mine. I mean, work is fine, but chilling is the future

06.08.2025 16:39 β€” πŸ‘ 343    πŸ” 12    πŸ’¬ 45    πŸ“Œ 4

[🧡]$string

07.08.2025 01:12 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I would love to get up to refill my water, but I have a very cozy, sleepy dog on my lap that told me no.

06.08.2025 19:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
MCP Server | PowerShell Universal Enable a model context protocol server.

#PowerShell Universal 5.7 nightly has an **experimental plugin** for a Model Context Protocol (MCP) server to allow you to hook agents like @github.com CoPilot directly into your PowerShell scripts. docs.powershelluniversal.com/platform/plu...

05.08.2025 20:05 β€” πŸ‘ 10    πŸ” 3    πŸ’¬ 0    πŸ“Œ 0

It's been a great watch! Highly recommend.

05.08.2025 19:47 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

That's my exact question. What on earth is the use case where this is set to allow by default?

04.08.2025 11:58 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Yep! If you use the Active Directory Administrative Center app instead of Active Directory Users and Computers app, I believe it logs what the PowerShell commands are to accomplish what you did in the GUI. Parts of the inbuilt Server Manager also do this. Very handy tool!

02.08.2025 22:34 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@wollymight.bsky.social

02.08.2025 22:31 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

Really good point & should mostly work. Here's some very rough AI-gen #PowerShell that seems to mostly work to kill #Adobe related processes in a Windows virtual machine I have:

gist.github.com/griffeth-bar...

Of course you could do it without the GUI and just have a function you run that does it.

02.08.2025 22:31 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Updated 😁

02.08.2025 15:21 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

You're right, I totally forgot to provide an inbuilt alias, which would be a good-guy thing to do. I'll adjust it next time I'm at my computer! Thanks for pointing that out!

02.08.2025 12:03 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Video thumbnail

Want to generate a shortened URL from #PowerShell? You can use my `New-ShortenedUri` function:

πŸ”— gist.github.com/griffeth-bar...

02.08.2025 08:31 β€” πŸ‘ 3    πŸ” 2    πŸ’¬ 1    πŸ“Œ 0

Would be rather unfortunately to flip that switch and run your log storage out of space quickly due to noisy PowerShell logging. Have seen this before in orgs where there are lots of automations/scheduled tasks using PS that write to the event log.

01.08.2025 21:36 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Some great points!

Luckily, CIS benchmarks now recommend *enabling* PowerShell logging. Though I do suggest people considering enabling this to look at the size of your environment, monitor the rate of logging for average hosts, and consider the size of your SIEM/log aggregation storage.

01.08.2025 21:36 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Feels dumb to have not found that sooner. Definitely looked at it for far too long.

01.08.2025 21:31 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Feels dumb to have not found that sooner. Definitely looked at it for far too long.

01.08.2025 21:31 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

It appears 1 of the several vCenters the script connects to has an authentication configuration issue that is resulting in it making the script prompt for credentials and the noninteractive session of the scheduled task can't handle that, so it would hang.

01.08.2025 21:31 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I did not -- probably should have though that's a good suggestion. Turns out the .NET version was a red herring. I ended up using PsExec to run an interactive PS session as the gMSA and run the script with some additional debugging output and found the issue.

01.08.2025 21:31 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

It appears 1 of the several vCenters the script connects to has an authentication configuration issue that is resulting in it making the script prompt for credentials and the noninteractive session of the scheduled task can't handle that, so it would hang.

01.08.2025 21:29 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

A good thought, but I did rule that out. Turns out the .NET version was a red herring. I ended up using PsExec to run an interactive PS session as the gMSA and run the script with some additional debugging output and found the issue.

01.08.2025 21:29 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Have just discovered the Powershell "Evergreen" module. Holy shit, this is amazing. Almost totally obsoletes PMPC and Winget for our purposes, and it's free.

31.07.2025 22:39 β€” πŸ‘ 1    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Because the versions match and the import in the script works fine when not run by the gMSA, I assume there's some limitations or issues with the gMSA portion? Looking for any input. Many thanks in advance!

31.07.2025 13:41 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I've also made sure the module is up-to-date.

31.07.2025 13:41 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

When run as gMSA the error I find when debugging is that it couldn't be imported because the .NET version (4.7.2) is not in the permitted versions. Upon inspecting the module manifest, 4.7.2 is indeed allowed.

31.07.2025 13:41 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Alright knowledgeable #Microsoft #ActiveDirectory folks. I'm apparently dumb and coming up empty-handed. If a #PowerShell script is scheduled via Windows Task Scheduler as a gMSA, why does it fail to import a module (VMware.PowerCLI), but the script's module import works when not run with a gMSA?

31.07.2025 13:41 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 3    πŸ“Œ 0

That's rather unfortunate, and doesn't sound like vacation.

30.07.2025 05:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I love this

29.07.2025 04:47 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@griff.systems is following 20 prominent accounts