Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Powershell If statement

$
0
0

Hi All expert,

Anyone can help me amend below if statement so that it works?

 

$CountryCode =  "MY"

If ($CountryCode -eq "AT" -or "BE" -or "CH" -or "CY" -or "CZ" -or "DE" -or "DK" -or "EE" -or "ES" -or "FI" -or "FR" -or "GB" -or "GR" -or "HU" -or "IE" -or "IL" -or "IS" -or "IT" -or "LT"

-or "LU" -or "LV" -or "MT" -or "NL" -or "NO" -or "PL" -or "PT" -or "SE" -or "SI" -or "SK")
{
 $Country = "EMEA"
}
Else
{
 $Country ="Others"
 }

My result getting for $Country is EMEA, I should getting Others.....

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles