The scenario is I have a table that contains a list of standard issues as shown below,
New: – Health Service Heartbeat Failure
This computer is offline
Jaguar Service Will be Restarted
Secondary - is down
I need to compare a string value through the list that has some more added values in it.
$variable =[string]“Secondary - VM-ABC123 is down”
if($list -match $variable)
echo “Standard Issue”
echo “New Issue”
- As you could see the string in the variable has the server name in it but the standard issue will not have the server names . How will I match it ?
Any suggestions will be a great help…
thanks in advance