How would you do that with PowerShell?:

PS C:\InterSystems\Cache\bin> .\csession mycache -"U" user "##class(test.OsCall).inString(""""""abd"""""")"

<INVALID ARGUMENT>>
PS C:\InterSystems\Cache\bin>

Combination of escape-characters doesn't work like these "##class.....(\`"abd\`")" or "##class....(`"abd`")"

compared to CMD:

C:\Users\me> .\csession myCache -"U" user "##class(test.OsCall).inString(""""""abd"""""")"  //see Seans good answer


Argument read: abd  (this comes from my Caché-class, so this environment works properly)

Instead of using $ZSEARCH you can use the query FileSet in class %File:

ClassMethod getFiles(pDir As %String, pMask As %String)
{
   set dir=##class(%File).NormalizeDirectory(pDir)
   set result=##class(%ResultSet).%New("%File:FileSet")
   do result.Execute(dir,pMask)
   while result.Next() {
      write !,result.GetDataByName("Name")
   }
}