vendredi 28 avril 2017

Powershell - check if three variables match two specific strings

I have to check if the variables $var1, $var2, $var3 contain "172.20.110." or "172.20.111.". Is there a way to this with an IF statement (not a beautiful solution) or is there a better way to that. For Example: Can I create a "network object" with 172.20.110.0/23 (255.255.254) and check the variables against it?

Aucun commentaire:

Enregistrer un commentaire