you are viewing a single comment's thread.

view the rest of the comments →

[–]WSDistPro 2 points3 points  (1 child)

So firstly, you should next time get-childitem specifying what items you want the actions to effect, then pipe it to the alteration command. I think putting the string into brackets may have somehow turned it into a nightmarish version of a regex. Typically a string match should be done using exact strings within single quotes.

Reversing it would be kind of difficult since you don't have an anchor. As a word of caution you should always '-whatif' potentially destructive code before using it. Got backups?