Jordan Borean's Avatar

Jordan Borean

@jborean.bsky.social

231 Followers  |  56 Following  |  209 Posts  |  Joined: 03.07.2023  |  2.2621

Latest posts by jborean.bsky.social on Bluesky

Also don’t use the static field here as it’s UTF 8 with a BOM. Use `[Text.UTF8Encoding]::new()` instead.

14.11.2025 23:02 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

$OutputEncoding is for piping data into binaries like `"value" | foo.exe`. Using `>` to redirect to a file is an alias for `| Out-File $path` and on WinPS the default encoding here was UTF-16/Unicode. Pwsh 7 now defaults to a BOM-less UTF-8. You can use $PSDefaultParameterValues to change > on WinPS

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

You can do both in PowerShell if you wanted to. The param block is mostly the default because parameter declarations get a bit long and honestly is there really too much of a difference doing it on the function name line or just below it.

06.11.2025 09:45 β€” πŸ‘ 6    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

How long is a piece of string? Very hard question to answer without seeing what you are wanting to port.

23.10.2025 19:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

What do you have that still requires PowerShell 2.0? It's been 13 years since PowerShell 3.0 was released and nearly 10 since 5.1.

15.10.2025 03:35 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

... I can't reconcile the willingness to provide write access to something that can generate anything. At least with it providing the queries in ask mode I can vet it by actually looking at it.

15.10.2025 03:34 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

To me it's just a step too far for convenience's sake. What happens if you are too liberal in your allow list and allow things like multiple statements where the first is a SELECT but the second is something that modifies the data. I'm all for using AI but ...

15.10.2025 03:34 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I still have a really hard time trusting an MCP implementation that has some sort of write access. It’s hard enough trusting 3rd party code now I need to trust something that can generate who knows what.

15.10.2025 03:28 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

MVP, gotta start somewhere :)

15.10.2025 02:57 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Maybe they'll add support for running INSERT, UPDATE, DELETE, etc first before doing SELECT :P

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

Joys of env vars being a process wide concept. Another reason why I wish pwsh had a way of setting env vars in line when executing a new process as thread jobs will step on each others toes if you tried to do a similar thing

01.10.2025 18:35 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I've heard this before, time to tell if the real world numbers actually stack up and battery life gets close to Apple's offering. Would love some actual competition in the laptop space so we aren't just forced to use Macbooks if we want decent performance and battery life.

30.09.2025 00:01 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The trouble is that it can be more than just a number. A DateTime is a ValueType yet you probably wouldn't consider it to be one. Any structs are ValueTypes yet structs look more like a property bag object.

29.09.2025 23:58 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

That description really seems like the typical Azure module docs to me. Like what exactly is a β€œvalue” here. What scenarios are you finding it useful for determining if it’s a value vs reference type.

29.09.2025 23:19 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Even that probably won’t help. Seems like Microsoft hates PowerShell

23.09.2025 20:38 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
GitHub - JustinGrote/ModuleFast: A "fast and loose" way to install modules from Powershell Gallery quickly. Meant for CICD, not production A "fast and loose" way to install modules from Powershell Gallery quickly. Meant for CICD, not production - JustinGrote/ModuleFast

I still use Pester even with my binary modules. It's been good enough for me really but I've been using it since the early v4 days so I've probably gone blind from just time. PSScriptAnalyzer definitely needs some competition but try out github.com/JustinGrote/... for installing packages.

23.09.2025 01:04 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

As for -EncodedCommand’s encoding. It can’t really change for backwards compatibility. There would have to be an extra arg added to control what encoding the base64 bytes represents.

21.09.2025 18:54 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

It’s β€œdefacto” because it’s essentially the Unicode encoding that most modern tools default to these days. Even pwsh 7 thankfully uses it when interacting with files without a BOM. Windows and Microsoft tech from the 00s just use UTF-16 it was built at a time where UCS2 was seen as the future.

21.09.2025 18:52 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 2    πŸ“Œ 2

If you are talking about -EncodedCommand in pwsh then yea it uses Utf-16-le encoded bytes. Sucks yea because now it uses more chars for normal ASCII based scripts but the joys of a product built before UTF-8 became the de facto standard :(

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

Nearly running out of fingers for this shortcut. Need to up my twister game.

11.09.2025 19:24 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
[MS-SHLLINK]: Shell Link (.LNK) Binary File Format Specifies the Shell Link Binary File Format, which contains information that can be used to access another data object. The

They are a binary file with the structure documented under learn.microsoft.com/en-us/opensp.... The COM application is explorer’s way of exposing how to manage them under a public API.

11.09.2025 18:14 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Windows PowerShell has an alias for curl to the cmdlet Invoke-WebRequest but Windows itself has a full blown curl.exe which runs natively on Windows and is the curl you all know and love. The curl alias in PowerShell predated curl.exe in Windows by many years.

03.09.2025 18:57 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Robert Prust

Robert Prust

🚨New Microsoft MVP Alert🚨

Robert Prust

Award Category: Microsoft Azure

Technology Area: PowerShell

Country: Netherlands

01.09.2025 10:29 β€” πŸ‘ 12    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
Stephen Valdinger

Stephen Valdinger

🚨New Microsoft MVP Alert🚨

Stephen Valdinger

Award Category: Microsoft Azure

Technology Area: PowerShell

Country: United States

01.09.2025 16:29 β€” πŸ‘ 8    πŸ” 4    πŸ’¬ 0    πŸ“Œ 0

Well that was short lived. Turns out no changes are needed in PowerShell 7 to get this working. Add `-CompilerOptions '-debug:embedded'` to the Add-Type call and ensure you have these options set in the VSCode launch config "attachDotnetDebugger": true, "createTemporaryIntegratedConsole": true

20.08.2025 03:59 β€” πŸ‘ 8    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Using a custom Add-Type cmdlet called Add-DebuggableType to compiled C# code in PowerShell that can also be debugged through the C# debugger.

Using a custom Add-Type cmdlet called Add-DebuggableType to compiled C# code in PowerShell that can also be debugged through the C# debugger.

Ever wanted to debug C# code compiled through Add-Type in PowerShell? The function Add-DebuggableType at gist.github.com/jborean93/bc... can be used in PowerShell 7 to do just that. Going to try and send a PR through so that the builtin Add-Type can do the same thing.

20.08.2025 03:32 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1

I do agree that using an alias for a common tool without the same input/output was a poor decision. This curl one has been made worse by actually adding curl to Windows causing this confusion. Aliases are powerful but default aliases can be dangerous for these reasons.

10.08.2025 22:24 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Granted I wrote it with VSCode in mind but nvim supports the Debug Adapter Protocol and I've seen someone get it working in nvim before. Just not sure how involved it was.

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

Just gotta add support for ansibug and you can debug playbooks through nvim :)

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

Usually means the download of the nupkg failed for some reason so the local file isn’t a real zip. Best to check things like proxies and manually verify the URLs can be reached successfully (Azure/PSGallery/etc)

23.07.2025 23:57 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@jborean is following 20 prominent accounts