i am new Powershell, I’m having a small issue. i just need to echo yes to the Remove-Item command. but i am getting “Remove-Item : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:12”
That’s not really what the pipeline is for, recommend that you get a book and understand the basic concepts. Adding a -Force or -Confirm:$false should override the prompt:
Hi Rob, I appreciate your feedback. I am currently reading many different articles and watching many videos on the subject. As mentioned in my original post I’m new to this, hence why came to a forum with experts looking for advice. i am struggling with the pipeline concept. In my mind it would seem an echo yes would go before the command to delete the directory, since you’re going to be prompted for a yes or no responce. And since the pipeline just connects the output of the first into the input of the second, conceptually I thought this made sense.
But as I pointed out my post (I’m doing something wrong) and looking for expertise in helping me understand where I’ve made my mistake. I appreciate your feedback, but next time could you add some recommended reading. Again I’m new to power shell commands, I’m just struggling with this one very simple command. Once I get it figured out I will continue researching more power shell until I get stuck on the next one.
I assume forms like this are meant to help people like me who are not as proficient as people like you.
with both your help, i got it working. The only extra thing I need to do outside of your advice was to add the Recurse switch to the command to clear out the sub items.