• 0 Posts
  • 25 Comments
Joined 1 year ago
cake
Cake day: July 10th, 2023

help-circle
  • 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:
    • Then show the window:
      • $Window.ShowDialog() | Out-Null


  • 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.









  • 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.






  • 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.


  • Same here. I think my friends have been expecting me to come crawling back to Windows but not only have I since used the SSD for other Linux projects, I have had no desire to go back to Windows. OpenSUSE Tumbleweed with KDE has been a true delight to use and learn Linux with. I smile every time the desktop loads. I use three monitors and KDE handles windows better than Windows ever could. It does it with far more customization options and its features just make sense and feel really useful, all without being forced.

    Oh, and all my games run with higher FPS than they did with Windows 11.

    I have had to reinstall it twice due to my learning process, but the last reinstall was a while ago and I’ve since learned how to fix problems that I create or the very rare update issues. It’s a very different beast when you’re coming from a lifelong use of Windows.



  • I was just thinking about this and how weird and fucked up it is. Imagine a country where 13% of schools were owned and operated by the Flat Earth Society, and nobody questions it.

    Unless they have Jesus there healing the sick just what the hell is the big idea? There must be some reason or history to it. Maybe they built hospitals where none were for the community?