I have the follow snippet a powershell script and the nested if statements are not being executed. Can you tell me why ? I’ve recently got back into the programming game so its probably something simple
$false.
$IgnoreThisLine = $false
$tmpString = "(DATUM CTR OF BLADE)"
$EndOfDescription = $null
$cncPrograms ="(165756 SIDE 1)"
if ($IgnoreThisLine = $false ) {
If ($tmpString -match '\(') {
$EndOfDescription = $false
$cncPrograms = $tmpString
}
else {
$EndOfDescription = $true
}
}
“-eq” not “=” to test for equality with PowerShell.