1 2 3 4 5 6 7 |
#call out the paramenter and data type, in our case [string]. param( [string]$arg1 ) if ($arg1 -eq "revert") { 'do this' }else { 'do that' } write-host $arg1 #shows the string |
Usage example:
test.ps1 revert
1 2 3 4 5 6 7 |
#call out the paramenter and data type, in our case [string]. param( [string]$arg1 ) if ($arg1 -eq "revert") { 'do this' }else { 'do that' } write-host $arg1 #shows the string |
Usage example:
test.ps1 revert