powertoys-np uninstall script is: "script": "( Get-WmiObject Win32_Product | Where-Object Name -EQ 'PowerToys (Preview)').uninstall()"
But if someone use pwsh, there would be an exception:
Get-WmiObject: The term 'Get-WmiObject' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
powertoys-np uninstall script is:
"script": "( Get-WmiObject Win32_Product | Where-Object Name -EQ 'PowerToys (Preview)').uninstall()"
But if someone use pwsh, there would be an exception:
Get-WmiObject: The term 'Get-WmiObject' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Refer: https://github.com/PowerShell/PowerShell/issues/4766