Scripting Guy Blog
devblogs.microsoft.com/scripting · Company blog · on HN since 2020
The Scripting Guy Blog is Microsoft's official blog on PowerShell scripting, covering registry access, .NET use, and automation.
What HN saysHN commenters cite it for PowerShell details, such as JSON handling, cmdlet naming, and zone identifier streams.
15HN people shared it
12linked it in comments
3stories submitted
9story points
6 months agolast shared
2020people per year2026
Most-shared posts
- 1Learn how to use net framework commands inside windows powershell2 people · first shared 2022
- 2Adding a GUI to Powershell Scripts (2014)1 people · 4 points · first shared 2022 · discussion on HN
- 3PowerShell for Programmers: A Quick Start Guide1 people · 3 points · first shared 2020 · discussion on HN
- 4Where.exe–The What, Why, and How1 people · 2 points · first shared 2024 · discussion on HN
- 5Getting to know foreach and foreach object1 people · first shared 2023
- 6Weekend scripter run c code from within powershell1 people · first shared 2026
- 7Use powershell to create scheduled tasks1 people · first shared 2020
- 8Working with json data in powershell1 people · first shared 2026
- 9Powertip use powershell 3 0 to identify zone information of files1 people · first shared 2023
- 10Learn about using powershell value binding by property name1 people · first shared 2021
- 11Weekend scripter use powershell to find longest cmdlet name1 people · first shared 2025
- 12Learn how to configure powershell memory1 people · first shared 2021
- 13Use the powershell registry provider to simplify registry access1 people · first shared 2024
- 14Table of basic powershell commands1 people · first shared 2023
What HN people wrote when they linked it
bombcar · 2026-04-29
Yes - https://devblogs.microsoft.com/scripting/working-with-json-data-in-pow…
Tons of bugs in scripting in Unix come from the fact that data and metadata are interspersed in the same stream (you can mitigate somewhat with stderr vs stdout but hardly anyone does). Examples include things like trying to handle random filenames from * expansions.
It’s a bit more annoying to deal with sometimes, but for actual scripts it’s much more foolproof.
xargs is one of the programs that is designed to work around the original issue.
cjfd · 2025-02-09
Abbreviating create as 'creat' is a bit stupid but it is the kind of quirk that makes me feel at home. The opposite can be found here: https://devblogs.microsoft.com/scripting/weekend-scripter-use-powershe… . That is a world where well... I have switched jobs once specifically to get out of that world....
nullindividual · 2024-09-10
It was introduced with Windows PowerShell 1.0[0]. A text editor would need to directly support managing the registry, but you can read/write/search/do terminally-stuff to the registry via PowerShell.
The term we're looking for is a PSProvider of which there are many. There's even a PSProvider for SharePoint Online[2].
[0] https://devblogs.microsoft.com/scripting/use-the-powershell-registry-p…
[1] https://learn.microsoft.com/en-us/powershell/module/microsoft.powershe…
[2] https://github.com/pnp/powershell/blob/96d00aa60379d8e3310f79701e0617c…
ciupicri · 2023-03-13
One of the most popular ADS is probably the Zone.Identifier [1][2] which is how Windows knows if the program you're trying to run was downloaded from the Internet.
[1]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/…
[2]: https://devblogs.microsoft.com/scripting/powertip-use-powershell-3-0-t…
pjmlp · 2022-08-21
.NET by definition, as PowerShell is .NET based, then by making use of .NET interop capabilities into native libraries and COM.
https://docs.microsoft.com/en-us/powershell/scripting/samples/creating…
https://devblogs.microsoft.com/scripting/learn-how-to-use-net-framewor…
WorldMaker · 2021-12-09
For the third item in majkinetor's list, this is maybe one of the better explainers, with plenty of screenshots:
https://devblogs.microsoft.com/scripting/learn-about-using-powershell-…
If you pipe objects around between cmdlets, PowerShell will auto-bind object properties to cmdlet parameters. Which feels like the magic of the Unix pipe text streams everywhere but lets you skip several text parsers (no grep/awk/sed intermediates perhaps) and feels like even more magic when it just works: `Get-Process -Filter something | Stop-Process`. The blog post gets into some of the details of how it works and that it isn't just magic and that in PowerShell you can even inspect with tools like Get-Help to discover how it is doing it and use that to your advantage to automate complex tasks with very simple command lines.
oblio · 2020-05-26
Natfan · 2026-01-07
i've never used nushell, but i've always felt that people have been sleeping on PowerShell.
yes, it was _originally_ only for Windows, but PowerShell 6+ uses .NET Core, which is OS independent. this means that a few helper functions like GeneratePassword[0] are gone, but it's _mostly_ at parity with .NET.
the Verb-Noun structure can be confusing at first, but once you know the approved verbs[1], you can usually guess your way through command discovery, which is not something i can say for most POSIX tools (useradd and adduser do different things!!)
it's also object oriented by design, with default aliases like ?[2] and %[3], querying structured data is a breeze.
- want to check a CSV? Import-CSV[4].
- want to call a REST/SOAP endpoint? Invoke-RestMethod[5] has you covered.
- DNS queries? Resolve-DnsName[6]
as it's built on top of .NET, you get the whole CLR[7] at your fingertips! you can make a TCP client[8] in PowerShell, or even just write C# directly in your terminal[9] and execute it the same way.
such a flexible and useful language, even if it is a little slow and owned by micro$oft. but it _is_ open source[10]!
---
[0]: https://learn.microsoft.com/dotnet/api/system.web.security.membership.…
[1]: https://learn.microsoft.com/powershell/scripting/developer/cmdlet/appr…
[2]: https://learn.microsoft.com/powershell/module/microsoft.powershell.cor…
[3]:…
delta_p_delta_x · 2024-07-04
I'm not an expert, but I use UNIX/Linux at work and only Windows at home (I have a dormant Arch Linux install that I haven't touched in a couple of years), and hopefully you think I'm qualified to respond.
I feel Bash is a 'glue language' in every sense of the word, and is optimised for interactive command-line usage because of its terseness. Being remotely productive on Bash presupposes the presence of an entire UNIX subsystem and coreutils (which is why Git Bash for Windows drags along an entire `/usr/bin` directory with all the coreutils in it). You can't really do much in it without the coreutils.
I find that Bash parseability and ease-of-understanding rapidly deteriorates in scripts of increasing complexity. After about a hundred lines of code I reach for other languages. I personally dislike its unintuitive syntax, global scope, and weak, dynamic typing. The terseness that lends itself to powerful interactive command-line usage means script readability plummets. Of course, that might just mean I'm inexperienced with respect to Bash and need more practice, but I find this a fairly common opinion amongst colleagues and friends. In my opinion, Bash scripts are write-only. It is a wonder that something like neofetch[1]—which is an eleven thousand-line monstrosity—lasted this long (if I recall correctly the author stopped maintaining it because—amongst other reasons—it had just become too complicated).
I find that people understand PowerShell better when they realise it…
cyberbanjo · 2023-04-29
I have seen that, and that's partially why it seemed so confusing to me but at least one difference is
The ForEach-Object cmdlet works much like the Foreach statement, except that you can't pipe input to a Foreach statement. For more information about the Foreach statement, see about_Foreach.
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershe…
And another appears to be performance
PS /home/me> $time = (Measure-Command
{
>> 1..1E4 | ForEach-Object
{
>> $_
>> }
>> }).TotalMilliseconds
PS /home/me> [pscustomobject]@
{
>> Type = 'ForEach-Object'
>> Time_ms = $Time
>> }
Type Time_ms
---- -------
ForEach-Object 144.558
PS /home/me> $Time = (Measure-Command
{
>> ForEach ($i in (1..1E4))
{
>> $i
>> }
>> }).TotalMilliseconds
PS /home/me> [pscustomobject]@
{
>> Type = 'ForEach_Statement'
>> Time_ms = $Time
>> }
Type Time_ms
---- -------
ForEach_Statement 17.621
https://devblogs.microsoft.com/scripting/getting-to-know-foreach-and-f…
deafpolygon · 2023-02-09
Every command has a short name.
A handy "punctuations" cheatsheet I found on reddit: https://www.red-gate.com/simple-talk/wp-content/uploads/2015/09/PSPunc…
Short aliases for all major commands: https://devblogs.microsoft.com/scripting/table-of-basic-powershell-com…
Some commands have more than one alias, and you can set your own, of course.
PowerShell also has a very nice help system. For any commands that Microsoft provides, you can type : Get-Help Get-ChildItem
It will list all the various parameters, as well as the various aliases.
As far as return values, you can do $? or type out $LastExitCode - it works the same way you expect.
For a fuller help view you can type "help Get-ChildItem" (all commands and parameters are NOT case-sensitive - it does not care if you type LS or ls, get-childitem vs GET-CHILDITEM does not matter). I prefer this - it helps in remembering.
1vuio0pswjnm7 · 2021-12-05
Honestly I do not really understand this idea because, AFAIK, JSON was designed for Javascript in a web browser. By and large, Javascript-enabled web browser expect access to generous amounts of memory. This is not the case for the common UNIX userland programs. These programs do not expect large amounts of memory and many are written with the intent that they may be used to process text line-by-line. This JSON idea reminds me of Windows "PowerShell". Microsoft actually has to limit how much memory can be used by the shell. Why is that.
https://devblogs.microsoft.com/scripting/learn-how-to-configure-powers…
One of the things I like most about the UNIX userland is that I can use small programs to edit vary large files, without needing lots of memory. I want programs that are designed to accomodate the possibility of line-by-line processing.
If the intent is to make output network friendly, maybe something like netstrings is useful. Easy to parse. Low memory footprint.
Seems to me this JSON idea is not designed to improve performance, agility or resource efficiency but to ignore the UNIX example in favour of a different, slower, approach that is perceived as easier for some people to use. Namely those who do not want to spend the time to learn how to use an existing, faster solution with lower resource requirements.