Powershell Check If String Contains Substring From The End Sql