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@jborean.bsky.social
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 π 0You 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 π 0How 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 π 0What 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 π 0To 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 π 0I 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 π 0MVP, gotta start somewhere :)
15.10.2025 02:57 β π 0 π 0 π¬ 1 π 0Maybe they'll add support for running INSERT, UPDATE, DELETE, etc first before doing SELECT :P
15.10.2025 02:12 β π 1 π 0 π¬ 1 π 0Joys 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 π 0I'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 π 0The 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 π 0That 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 π 0Even that probably wonβt help. Seems like Microsoft hates PowerShell
23.09.2025 20:38 β π 1 π 0 π¬ 0 π 0I 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 π 0As 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 π 0Itβ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 π 2If 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 π 0Nearly running out of fingers for this shortcut. Need to up my twister game.
11.09.2025 19:24 β π 0 π 0 π¬ 1 π 0They 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 π 0Windows 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 π 0Robert Prust
π¨New Microsoft MVP Alertπ¨
Robert Prust
Award Category: Microsoft Azure
Technology Area: PowerShell
Country: Netherlands
Stephen Valdinger
π¨New Microsoft MVP Alertπ¨
Stephen Valdinger
Award Category: Microsoft Azure
Technology Area: PowerShell
Country: United States
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 π 0Using 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 π 1I 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 π 0Granted 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 π 0Just gotta add support for ansibug and you can debug playbooks through nvim :)
29.07.2025 20:54 β π 1 π 0 π¬ 1 π 0Usually 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