-1

I am trying to use PowerShell to delete a lot of folders.
When I run the command:

Remove-Item -Filter *Angle* -WhatIf

I get the error:

Supply values for the following parameters

Does anyone know why I get this error?

0

You havent provided the path\folder you want to remove.

For example:

Remove-Item c:\myfolder -Filter Angle -WhatIf

  • When I run this: Remove-Item . -Filter Angle* -400eV -Recurse, I get teh error "A positional parameter cannot be found that accept the argurment -400eV – Jackson Hart Mar 8 '16 at 17:46
  • What exactly is "-400ev" – Ramhound Mar 8 '16 at 18:09
0

You have to provide a path to Remove-Item as well as the recurse switch to tell it to delete subfolders

Remove-Item -Path C:\myproject\temp -Recurse

  • When I run this: Remove-Item . -Filter Angle* -400eV -Recurse, I get teh error "A positional parameter cannot be found that accept the argurment -400eV – Jackson Hart Mar 8 '16 at 17:43
0

Two errors on your statement.

  • You are not providing the path to delete
  • Angle is nothing, provide a string in the form "stringValue" or trough a variable

For more information use man remove-item, man about_parameters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.