Jordan Borean
jborean.bsky.social
Jordan Borean
@jborean.bsky.social
230 followers 56 following 210 posts
Posts Media Videos Starter Packs
How long is a piece of string? Very hard question to answer without seeing what you are wanting to port.
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.
... 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.
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 ...
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.
MVP, gotta start somewhere :)
Maybe they'll add support for running INSERT, UPDATE, DELETE, etc first before doing SELECT :P
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
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.
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.
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.
Even that probably won’t help. Seems like Microsoft hates PowerShell
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.
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
github.com
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.
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.
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 :(
Nearly running out of fingers for this shortcut. Need to up my twister game.
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.
Reposted by Jordan Borean
🚨New Microsoft MVP Alert🚨

Robert Prust

Award Category: Microsoft Azure

Technology Area: PowerShell

Country: Netherlands
Reposted by Jordan Borean
🚨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
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.
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.
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.