The Powershell not equal operator is –ne. This how you use it.
When dealing with numbers:
PS> $a = 3
PS> $b = 5
PS> $a -ne $b
True
When dealing with strings you have a bit more choice:
PS> $a = 'abcd'
PS> $b = 'efgh'
PS> $a -ne $b
True… Read the full text.