I’m having an issue calling a PS script with two parameters. Both parameters are standard SMTP addresses, but the first parameter can have multiple addresses separated by semi colons.
The script runs fine if there is only one address in each parameter. I can get it to work ok if the first parameter has multiple addresses if I put single quotes around the parameter.
Where I run into problems is if the first parameter has multiple addresses and one (or more) of the addresses has an apostrophe (i.e. o’brien@foo.com).
Is there a way I can enclose the first parameter so that it can contain both apostrophes and semi colons?
thanks.
You can either use a backtick (`) to escape it, or surround it with double quotes. It sounds like we’re talking about a To and From type parameter? Here’s an example that might be close: