What is wrong with the syntax in this line??
I am working with registry keys containing several strings ending in -500 pertaining to registry values I need to keep, retain, such as S-1-5-21-980708528-2451121298-916178342-500 and S-1-5-21-980708528-2451121298-916178342-500, which end in -500, and these are different within each server I am working with, but
$i is part of a registry array containing SIDs like the ones above.
If ($i -notlike ‘*-500’)
does not filter them out. At least one of the two registry values ending in -500 is not filtered out with this statement, the first one in the list.
Is my -notlike syntax incorrect?? Single/double quotes seems not to matter.
There’s five servers involved so I’d better off using -notlike if I can.
Thank you, Tom