I have a comparison statement using -match in PS script
$propValue = (Get-ItemProperty "Registry::$($c.Name)" -Name "$($p)")."$($p)"
$productName = "C:\Program Files (x86)\MyApplication\MyApp"
if ($propValue -match $productName)
{
// Do something
}
On execution, the script throws error as Malformed \p{X} character escape in Powershell. What is happening here? How do I fix this?
Thanks.