TL;DR -
wmic service where "pathname='\"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"' AND ServiceSpecificExitCode=0" get name
#OR....
wmic service where (pathname="\"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"" AND ServiceSpecificExitCode=0) get name
Details -
While the other answer works for single-criterion questions, it'll error out for a compound query. I recommend using either the "Quote Before Equals" syntax or the "Paren Around Where" syntax. Here are some examples
Single-Where + Quote After Equals
Invalid alias verb == wmic service where pathname=""C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe"" get name
Invalid query == wmic service where pathname="\"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"" get name
Invalid alias verb == wmic service where pathname="^"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe^"" get name
Invalid alias verb == wmic service where pathname=^""C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe^"" get name
Invalid query == wmic service where pathname="\"C:\\ProgramData\\Microsoft\\Windows^ Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"" get name
Invalid query == wmic service where pathname="\"C:\\ProgramData\\Microsoft\\Windows\ Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"" get name
Works Perfect == wmic service where pathname='"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe"' get name
Single-Where + Quote Before Equals
No Instance(s) Available == wmic service where "pathname='C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe'" get name
No Instance(s) Available == wmic service where "pathname='^""C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe""'" get name
No Instance(s) Available == wmic service where "pathname='""C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe""'" get name
Invalid query == wmic service where "pathname=""C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe""" get name
Invalid alias verb == wmic service where "pathname='^"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe^"'" get name
Invalid alias verb == wmic service where "pathname='"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe"'" get name
No Instance(s) Available == wmic service where "pathname=\"C:\\ProgramData\\Microsoft\\Windows^ Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"" get name
No Instance(s) Available == wmic service where "pathname=\"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"" get name
Invalid alias verb == wmic service where "pathname=^"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe^"" get name
Invalid query == wmic service where "pathname=\"C:\\ProgramData\\Microsoft\\Windows\ Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"" get name
Works Perfect == wmic service where "pathname='\"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"'" get name
Single-Where + Paren Around Where
Works Perfect == wmic service where (pathname="\"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"") get name
Compound-Where + Quote After Equals
Invalid alias verb == wmic service where pathname='"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe"' AND ServiceSpecificExitCode=0 get name
Invalid alias verb == wmic service where pathname='"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe"' AND ServiceSpecificExitCode='0' get name
Compound-Where + Quote Before Equals
Works Perfect == wmic service where "pathname='\"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"' AND ServiceSpecificExitCode=0" get name
Compound-Where + Paren Around Where
Works Perfect == wmic service where (pathname="\"C:\\ProgramData\\Microsoft\\Windows Defender\\platform\\4.18.1902.2-0\\NisSrv.exe\"" AND ServiceSpecificExitCode=0) get name