November 30, 2011 at 8:11 am
Hi, Can anyone please advise what is wrong with this WMI EWT script?
SELECT * FROM __InstanceCreationEvent WITHIN 10
WHERE targetinstance ISA "CIM_DirectoryContainsFile"
AND TargetInstance.GroupComponent = "WIN32_Directory.Name=\"D:\\\\Dir1\\\\SubDir1\""
This seems to exactly match any examples I've found online, but when running the task the following error is returned..
[WMI Event Watcher Task] Error: An error occurred with the following error message: "Input string was not in a correct format.".
Thanks in advance for any suggestions..
November 30, 2011 at 8:49 am
Never mind - solved.. with this..
SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA "CIM_DirectoryContainsFile" and TargetInstance.GroupComponent= "Win32_Directory.Name=\"d:\\\\Dir1\\\\SubDir1\""
Cannot spot the difference myself, but maybe I had a carraige return in the original that it didn't like (?)
November 30, 2011 at 10:00 am
All that looks different it the case of "TargetInstance"..
CEWII
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy