This blog does a fairly straight-forward job on explaining the basics. For me, I learn best in an interactive 1:1 or well-constructed video, so ChatGPT was priceless. I could ask it stupid questions all day long, and after throwing some different ideas around I started to see the essential parts and just let my prior knowledge of PS, .NET, and C# WPF take it from there.
At the end of the day, all that really matters is using the PresentationFramework assembly and creating a window:
- Add-Type -AssemblyName PresentationFramework
- Either use Visual Studio > WPF Project and make the UI you want. Take the XAML file and use PowerShell to get the raw content:
- $Xaml = Get-Content -Path MainWindow.xaml -Raw
- $SanitizedXaml = $Xaml -replace "bad syntax e.g. Foreground={x:Null}" "Foreground="Transparent" # Certain XAML syntax is incompatible with PS XML
- [xml]$XmlReader = [System.Xml.XmlNodeReader]::new($SanitizedXaml)
- $Window = [Windows.Markup.XamlReader]::Load($XmlReader)
- Or, use .NET-style syntax in PS directly:
- $Window = [System.Windows.Window]::new()
- Then show the window:
- $Window.ShowDialog() | Out-Null
I appreciate the feedback. For the Linux side it's for personal projects and learning opportunities so starting with something familiar and growing from there is my goal.
I dabble in C and C++ so cli isn't out of the question for me. But .NET is my comfort zone, and I like the rapid tooling that PS offers.
I have multiple reasons to dig into Python so really I just need to get on with it.
Python is always something I intend to learn but never get around to. Does it natively handle GUI for process tooling or does it require a third party? What makes PowerShell so useful to me is the native ability to create visual applications without the need to compile. I can create tools for my company that launches right out of ConfigMgr Software Center and other technicians can contribute without needing a programming background.
At home I want to mess around with tooling for home services without having to resort to web development.
By far it's the object pipeline. Having structured data makes it easy to automate workflows in a predictable way. With bash everything is a string, so everything has to be parsed. It's tedious.
It took about a year of steady use before I came to enjoy the syntax. It shines in a production environment with other cooks in the kitchen. I never got into the C style, I like my code human readable at a glance. It's fine if everyone's a sage but we have a team with a mixture of skill levels and for me PowerShell gets it right.
I did install it on one of my machines but haven't dug in yet. I'm curious to see how much of my workflow will translate to Linux, yet at the same time I want to make sure I'm actually learning Linux and not using PS as a crutch.
Thanks for the reference. I'm looking at it and I think you're right.
After learning PowerShell and then moving to Linux and having to learn bash...I don't get this sentiment. PS is the shit. I can make full GUI applications and automate all kinds of workflows. Their use of objects makes it so easy to extract data and utilize it. Bash feels so much more primitive and clumsy by comparison. What am I missing here?
I loooove my openSUSE desktop. 11 was the last straw. No amount of AI is going to bring me back.
I HATE advertisements, and I paid for Pro but it seemed like they didn't care. They want to milk me for everything I'm worth.
Good thing we have options. Linux has gotten so good, it's better than Windows 11 while letting me decide how to use the OS. Big learning curve, but it's smooth sailing when you get past it.
Our ticketing system has "untrained user" and "works as designed, not as expected" as options. Can't fix the problem if you don't know its nature.
I hear a lot about those distros around here. I recently settled on openSUSE Tumbleweed after having used Fedora and ZorinOS for a while. It's so good, I haven't thought about switching to anything else. Manjaro, Pop_os, and NixOS are on my list if that ever changes.
I like AppImage a lot and I wonder why that didn't take off like Flatpak did. A timing issue, perhaps?
Yeah AppX is a different kind of application platform that was built to be secure. Breaking that security breaks functionality. What's lame is that they don't have mechanisms to allow you to change permissions at a granular level and then change them back to defaults. You have to hack it and deal with the consequences which is just bad design.
Appx is locked down tight on purpose. It's built to be a more secure application platform than exe.
Not saying it's right and you should have to deal, but that's why.
Editing to say I also went Linux last year and I love it far too much to ever go back to Windows. Flatpaks are similar to AppX but at least you can customize the permissions for them. Still I find them to be a bit of a pain to use for some apps.
I like it at work and used to like it at home until I ran out of space and was forced to make financial decisions. Now I use a cheap used server and Nextcloud/Syncthing.
Your wallet is pretty fucked but I got a 2023 Honda Odyssey and I never loved an automobile like this in my life. It's a perfect vehicle by my measure.
7 made me realize MS was getting serious about making a decent OS, 10 was the first version of Windows I was willing to shell out my meager savings for, 11 made me install Linux and I'll never go back.
Agree, I thought Vista was bad until we upgraded to Win8. Holy shit was MS huffing some whack shit when they designed that monstrosity.
I use it at work. I honestly like some of the features they added compared to what FF or Chrome have on offer. At home it's FF only, though I miss those Edge features.
While Microsoft deserves this, USPS workers don't. Spend the money you would have getting a newer computer that can run Windows 11 to fly to their headquarters and take the dump at their doorstep. Bonus points for maintaining eye contact with the receptionist or security guard.
Run a PowerShell session as admin and enter the following commands:
Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -match "OneDrive" } | Remove-AppxProvisionedPackage -Online -AllUsers
Get-AppxPackage -AllUsers | Where-Object { $_.Name -match "OneDrive" } | Remove-AppxPackage -AllUsers
Might be easier to do this in PowerShell ISE so you can edit these two commands. But this will first remove the installer package for OneDrive so that it can't reinstall again, and then it removes the installed app from all profiles.
I haven't personally tested this, but I use PowerShell professionally and the commands are solid. If it didn't work then it just means that Microsoft packaged OneDrive in a different manner than the other built-in apps. You can also remove other annoying apps that are pre-loaded this way. Just swap out "OneDrive" for the proper name or partial proper name of the appx app. Use Get-AppxPackage by itself to learn what the proper names are for the apps that are installed.