I have two variables, $audience and $prodType that will hold value of 1-3 and 1-4 respectively. I'd like to build a table of sorts to convert the numeric values into words that a user can read and understand. For example, if $audience = '1' I would like the script to Write-Host "audience is set to New York" and if $prodType = '3', the script would Write-Host "prodType is set to Sandwiches".
I would like a cleaner way to do this then a series of elseif statements.
If($audience = '1'){
Write-Host "audience is set to New York"
}
elseif($audience = '2'){
Write-Host "audience is set to Los Angeles"
}
Can anyone help me build such a module?