New
#380
Your command should say
... where-object {$_.packagename -like "*Microsoft.People*"}...
but is being read from the .bat file as
... where-object {$_.packagename ûlike "*Microsoft.People*"}...
The '-' symbol is being read as 'û'. Seems that Notepad may be saving it with the wrong encoding, try setting it to 'save as' using ANSI encoding. Also, you seem to be using the symbol – which is not the same as - (the minus sign) even though it looks similar.