Uninstall-WindowsFeature is a cmdlet that will only run in a 64-bit PowerShell instance. Because Automox runs its scripts in 32-bit PowerShell, you will need to use a scriptblock in order to run this cmdlet.
You can wrap your code in a scriptblock with the following format:
$scriptBlock = { YOURCODEHERE }
$exitCode = & "$env:SystemRoot\sysnative\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -WindowStyle Hidden -NoProfile -NonInteractive -Command $scriptBlock