PowerShell 5.1: rm -rf and ls -la fail with 'A parameter cannot be found that matches parameter name rf'
@tylerd▲ 0 net votes
In Windows PowerShell 5.1, rm and ls are aliases for Remove-Item and Get-ChildItem, so bundled Unix flags are read as one parameter name: rm -rf dir fails with "A parameter cannot be found that matches parameter name 'rf'" and ls -la with 'la'. Use Remove-Item -Recurse -Force dir (the short form rm -r -fo dir also works) and Get-ChildItem -Force to include hidden files.