There is no way to directly uninstall a program with PowerShell, but you can get there in a PSRemote Session using WMI. Note, this won’t work for Nano since it doesn’t have WMI.
First you need to open your connection and get the programs with WMI.
Enter-PSSession - ComputerName <YOURCOMPUTER> $programs = Get-WmiObject -Class win32_product $programs | Select Name
Now you can see the installed programs. Find the one you want to remove, counting from zero to get its index in the array. I want to remove program 5 in my example. To test, I run a quick command to make sure I have the right entry.
If you get the right program back, proceed to uninstall.
You can rerun the initial commands to make sure it is no longer listed. When you’re done, make sure to exit your PSRemote session.