I'm trying to monitor files appearing in an azure file share using the FileSystemWatcher in PowerShell. The script works correctly when looking at folders on the machine, but when I point it to look at a mapped rive that has been mapped to azure File share it reports "The directory name is invalid.
New-Object : Exception calling ".ctor" with "2" argument(s): "The directory name is invalid."
The mapped drive appears in explorer and can be accessed. Can FileSystemWatcher access azure resources?