Sign in

Fred

@psfred.bsky.social
356 followers 13 following 160 posts

PowerShell enthusiast, Bartender, Cloud Solution Architect @Microsoft

PostsRepliesMedia
Fred @psfred.bsky.social · 12/06/2026
Also added something long overdue: Write-PSFMessage now supports switching the callstack in the logs from its own to that of the ErrorRecord provided ... You can enable it globally too: Set-PSFConfig -FullName PSFramework.Message.LogErrorStack -Value $true
010
Fred @psfred.bsky.social · 11/09/2025
A quick example on how it works and my attempt to make it convenient :)
020
Fred @psfred.bsky.social · 31/05/2025
Hi #powershell folks, weekend, the time to relax, kick back, and do some PowerShell things you probably shouldn't have done. So. Announcing a new version of my String module, with new compression tools and a bad idea I couldn't stop myself doing ...
three lines of simple PowerShell code, and their result:
"Hello World".Tobase64()
"Hello World".Compress()
"Hello World".Compress().Expand()
051
Fred @psfred.bsky.social · 18/05/2025
Not really a new feature, but an important one: Install-PSFModule allows you to install to _remote_ computers, as long as you can get a PSSession to it (computer-name will do, if you have regular network access and the necessary privileges)
020
Fred @psfred.bsky.social · 18/05/2025
Another small new feature: It will now properly tell you when it skipped a module because it is already installed. Of course, installation / updates are not going to fail, just because a dependency that needs no update is currently in use. Or even if _does_ need an update ...
010
Fred @psfred.bsky.social · 12/01/2025
Well ... better intellisense never hurts* and adding that line isn't exactly a hardship. But not like I'm in any position to throw stones there - I've got my own rule I tend to disable. *OutputType is used by PS Intellisense for available properties of the output of your commands:
100
Fred @psfred.bsky.social · 03/01/2025
And to anybody who ever wanted some flexibility in the scopes available to your Install-* command (who wants their modules in their OneDrive?), there might be some new fun options there. Including dynamic scopes that are evaluated on the remote computers, of course.
200
Fred @psfred.bsky.social · 03/01/2025
Then there is the part where it can install the latest version of PSResourceGet in the same way. Not even the client computer needs internet for that, so long as they have PSFramework.NuGet and its dependencies at hand.
100
Fred @psfred.bsky.social · 03/01/2025
So, what do you get out of it? Well, for one thing, Install-PSFModule now comes with a "-ComputerName" parameter that also accepts PSSessions and can install xplat with SSH-based remoting.
100
Fred @psfred.bsky.social · 31/12/2024
Yes. Yes, I actually do. In PowerShell. Still better not to need to, but there's some fun to be had :)
An example of using regex and the match operator to parse out a log entry. Individual values are captured using parenthesis - (...) - and selected matches are named by starting the inner part of the parenthesis with "?<name>". They are then available as properties on the $matches variable. The example pattern used:
'(?<address>\d+\.\d+\.\d+\.\d+) on Port (?<port>\d+)$'
110
Fred @psfred.bsky.social · 27/12/2024
but ... but ... but ... FEATURES!!!!! Admittedly, it'll get some documentation before it ships ... but I'll likely mess more with features than with docs 😆 Command-prefix notwithstanding, that's a new module (hopefully) shipping this year 😎
110
Fred @psfred.bsky.social · 26/12/2024
Another good one you usually don't discover from the crossover (How would you know to look for it?): With the default windows editmode, whenever you could hit TAB, try hitting "CTRL+Space" instead :)
010
Fred @psfred.bsky.social · 18/12/2024
Btw, did you know about the (?m) regex option in this context?
A multiline string with several lines starting with abc. Replacing "^abc" only replaces the one at the very start. Replacing "(?m)^abc" replaces it in ALL lines that start with it.
251