As PowerShell 7 draws near, built on the successes of PowerShell Core, you will be asked to create PowerShell tools that work cross-platform. Or you may be asked to create a PowerShell tool to run on a non-Windows platform. Your command should still be centered on writing objects to the pipeline. Even if the source material is all text. As a reference take a look at https://jdhitsolutions.com/blog/pslinux/6855/powershell-scripting-for-linux-is-still-about-the-objects/ .
Your goal is to take the output from the Linux uname command and turn it into an object.
Each element corresponds to a piece of system information. Hint – uname –help
You should write a function that writes an object to the pipeline based on the uname command. Property names should not have spaces or characters. Don’t use kernel-release. It should be KernelRelease so similar. Your command should work locally on a Linux platform. Bonus points if you can incorporate remoting using SSH so that you can query a Linux system from a Windows platform.
For extra-special bonus points, include a definition of a few default properties or a formatting ps1xml file.
There are probably a few ways you can approach this challenge. As usual, please don’t submit any code solutions. Instead post links to your work such as your blog or Github. Good Scripting.