I have this line to remove all the registry entries in this key:
Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache\PurgeAtNextLogoff\ -name s* -whatif
I want to exclude the one with -500 at the end but using -exclude *-500 does not work, how do I revise this line to remove all entries but the one ending with -500??
I tried using -filter but I got an error saying the provider does not support the use of filters.
Any other ways I can get the line to remove all items but the one ending in -500??
Thank you, Tom