I want to create a WMI filter that will check for a certain directory. if the directory exists then the policy will apply certain permissions to that directory. This is the query I've written so far but it doesn't work:
I've put in double backslashes to escape the first one because when I put in single ones it gives an error. However, having refreshed the policy on the PC's that DO have that directory, when I run gpresult it says the policy was not applies because of the filter - meaning obviously my query is not correct. Can somebody help me figure out how this should be written?
Code:
SELECT * FROM CIM_DirectorySpecification WHERE DirectoryPath LIKE "%ProgramFiles%\\eCopy\\Desktop"