Powershell parameters


How can I make my script use a different variable based on parameter input?

say i want my script to open only one file but it has variables for 5 files

for example: script.ps1 -file1

would open file1 but if ran again with

script.ps1 -file2

it opens file2?

ive only figured out how you can use parameters for input like: script.ps1 -ip

submitted by /u/bittertomato
[link] [comments]

Leave a Reply