this post was submitted on 19 Jan 2024
1 points (100.0% liked)

Sysadmin

12 readers
1 users here now

A reddit dedicated to the profession of Computer System Administration.

founded 2 years ago
MODERATORS
 
This is an automated archive.

The original was posted on /r/sysadmin by /u/andrewchan0130 on 2024-01-19 06:36:23+00:00.


I have a PowerShell script that compare the folders/files between a DFS folders and a local folder and do robocopy mirror when there are discrepancies.

The dfs path is \domain\global\foldername

However, when I test run the powershell script. It gives error at the step get-childitem with an error "cannot find path "dfspath" because it does not exist"

I then copy the path and paste in the file explorer in the same computer, although took a few seconds, the folder can be accessed displaying all contents.

What weird is, after I manually access the DFS folder, I immediately go back and execute the script, now it runs without any problems.

After a while, the error appens again, and I can use the same manually step to work around that.

Any idea?

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here