by hobs · 2y ago · 0 comments
I loved powershell with (some of) its weird warts, but I have moved on.
Say what you want about bash, at least it doesn't pull stunts like that.
https://flowingdata.com/2011/06/30/organizational-charts-in-...
(hey, I managed to sneak a rifle past HN's Unicode filter :-D)
It is as if DevDiv is now full into UNIX like, poliglot, FOSS culture and such, now under Azure business unit, whereas WinDev is back into how to sneak people into Windows licensing and the usual old culture.
> Say what you want about bash, at least it doesn’t pull stunts pile that.
I guess it depends on what you consider to be included in the terminal’s domain? There are entire papers and guides on which commands are considered safe (sometimes only when run in a very specific way), and which variants, alternatives, etc. you should use instead, for Bash scripts, because of the inconsistency in what a command evaluates, does, and returns for various distros. That’s not to hate on Bash, but just to point out that it’s not a strength of Bash vs PS.
Or the Powershell way where on can access data members directly.
I thought I would prefer the second method more, because the access looked much cleaner/structured.
But after all these years (still mostly Unix scripting but Powershell and some other environments too) my mind has changed.
Would like to hear what others would prefer' Unix method with some scripting language or windows method with Powershell)
And this is exactly the problem.
You no longer have en_US as a locale? Have some titles lounger.
You no longer have en locale at all? Have an greška instead of error.
Oh, you the schmuk who don't agrees to use the best units in the world, totally retarded and "bUt iF yoU WriTe THe dATe as in the journal..."[0] but freedom ones? No longer accept 13 as an hour. Like come on, every idiot knows there is no such thing as an 13th hour!
Oh, you added an additional column to help your busniessor whatever? Your sEd MagIK gone to hell.
Should I continue?
[0] when was the last time you actually wrote multiple documents so you can actually benefit from MMM-dd?
I'm not aware of any difference in bash between vendor distributions for which this is true.
Monopolies always destroy innovation.
gcm | ? noun -like winget*
help Install-WinGetPackage
The "usual" winget cli tool is indeed not powershell compatible. But winget also ships with all the necessary cmdlets. You don't have to install anything extra.For instance https://github.com/microsoft/winget-cli/issues/3820 or https://github.com/microsoft/winget-cli/issues/3231.
Also, even though it does not completely work with PowerShell 5, it is marked as compatible. https://github.com/microsoft/winget-cli/issues/2881
The design choices made makes it weird. I hope it would be a good one in the future. But it is now problematic.
Install-Module -Name Microsoft.WinGet.ClientYes what I am doing can be done with intune but that's another story for another time. RIP Store for Business. I just want to deploy PowerBI and have it always be current and self updating.
I primarily write Powershell Core scripts for scenarios where I need to execute the same commands on a variety of operating systems, and I know that the script is likely to be maintained by your “typical” sysadmin (highly technical, but not a programmer)in an environment where installing runtimes for programming languages is discouraged. I switched to macOS as my daily driver about 2 years ago, so PS fits these scenarios pretty well, and Powershell Core updated fairly regularly. Sure there are annoying bugs and misses with the built-in and add-on MS modules: networking cmdlets are an almost total miss, Get-LocalGroup (and maybe other commands?) is totally broken on some AzureAD-joined machines, and the Azure and MgGraph Powershell modules still don’t have enough coverage to move on from the legacy Windows Powershell modules (or even to rely on just one of them, for areas they supposedly cover). But overall I’ve been pretty happy that 99% of the time I can write a powershell script once, and it will run on any machine with Powershell Core, in a consistent way.
There's still a lot of good stuff wrt powershell maintainability by normal humans (though the entire mental model of object output usually throws them for a loop for years) managing local stuff.
If you have a background in windows dev or any of those tools then yeah, easy mode go grab your tools, but for most people doing system automation the calling conventions and complete lack of discoverability within the powershell ecosystem (and their tools in no way helping out) made this not a realistic use case.
Shoot I have seen some powershell modules that have to embed string C#s and eval thing just to have basic performance or other basic use cases.
import xmlrpc
svr = xmlrpc.connect('http://remote/')
result = svr.add(1, 2)
The C# way is to use the Microsoft Windows Communication Foundation (WFC) Client Proxy using the Service Model Metadata Utility Tool and the Web Services Description Language (WSDL) and XML Schema Definition Language (XSD) files from the remote server, declare a public interface attributed as a Service Contract referencing a namespace, generate a class which inherits from the generic ClientBase<TChannel> and implements the new interface, create an instance of said WCF client and call its methods. (Or rely on Visual Studio magic to hide all that) - https://learn.microsoft.com/en-us/dotnet/framework/wcf/acces...In any decision, Python goes for "What would Guido do?" and C# gets some union of "what would a committee of Microsoft, IBM, Oracle do?", "What would impress Gartner?", "What is Microsoft legally obliged to do, and backwards-compatibly required to do?", "What would we do if we tried to do everything everyone needs all in one?", "What would Java do?", "What would a large team need to design and maintain a stable, typed, large system for years?".
PowerShell is on top of that; there's no simple included graphing and drawing, no simple hooks into Windows own voice recognition and OCR, and definitely not into whatever magically good ones newer Office / Cloud is using, no casual email or spreadsheet handling, no Visual Basic style form building, no simple data science; there's a few things you can do or download, generally less convenient than a Python equivalent. And Microsoft are leaving it all 'to the community' but the community is using Python so that's where the Excel power-user who wants to script a couple of things will go.
But PS Core is a programming language, right? And only installed by default on Windows?
I'm assuming there's other constraints on your system that make it preferable to installing bash or python on your Windows boxes?
(There’s also the Az CLI tool, which I don’t like as much as the Az PowerShell module but might be easier to manage in an environment like that.)
You have Azure Powershel Cmdlets (the old 5.1 based, and the new Powershell Core based), AZ CLI (in Python), AZD CLI (in Go).
The only one that offers full power is actually the AZ CLI one, e.g. some Kubernetes features aren't exposed in the others.
[0] https://learn.microsoft.com/en-us/cli/azure/what-is-azure-cl...