how do I pass a range of values on the command line – passing an expression as an argument
Your problem is that argument 29..30+40+50..52 is treated as a string literal in your .\eraseme.ps1 29..30+40+50..52 call – it is not recognized as an expression. To force recognition as an expression, enclose the argument in (…), the grouping operator: .\eraseme.ps1 (29..30+40+50..52) The same applies if you want to use output from (another) command as a … Read more