PowerShell: Script failing because AD objects have not replicated soon enough

前端 未结 4 646
-上瘾入骨i
-上瘾入骨i 2021-01-16 03:05

I have a script that creates two groups, a hand full of folders, and sets permissions on those folders. In my testing environment all of these processes work without issue b

4条回答
  •  迷失自我
    2021-01-16 03:28

    I had the exact same issue. It turns out, our filesystem only updated it's own cache of SIDs every 20 - 30 seconds. So if I created a new SID and tried to apply it to a folder straight away, our filesystem would say the SID was unknown. I modified a setting on our filesystem to allow it to accept 'unknown' SIDs (even though they were known to AD and it just hadn't updated). More info here:

    Issues With New-ADGroup, Set-ACL and Network Folders

    Sleeping the script is definitely not an option when you have 7.5 million files and folders!

提交回复
热议问题