I have this list of event monitors:
Register-ObjectEvent $watcher Created -SourceIdentifier Created -Action $action Register-ObjectEvent $watcher Changed -SourceIdentifier Changed -Action $action Register-ObjectEvent $watcher Deleted -SourceIdentifier Deleted -Action $action Register-ObjectEvent $watcher Renamed -SourceIdentifier Renamed -Action $action #Register-ObjectEvent $watcher Moved -SourceIdentifier Moved -Action $action #"moved" is not an allowed event #Register-ObjectEvent $watcher Copied -SourceIdentifier Copied -Action $action #"copied" is not an allowed event
So, “moved” and “copied” are not allowed events, how does one monitor a file that has been moved or copied? I have seen some scripts that monitor “create - delete” but that is not accurate or useful at all, especially in a work environment.
Any ideas?