I have a PS script that creates new AD groups then adds those new groups with Add-NTFSAccess. Most of the time the addition fails with this error:
Add-NTFSAccess : Cannot bind parameter 'Account'. Cannot convert value "" to type "Security2.IdentityReference2". Error: "The trust relationship between the primary domain and the trusted domain failed.
If I wait a bit I can issue the same Add-NTFSAccess and it works without issues. I tried adding a sleep delay which seems to help sometimes but still get the error. Is there a check I should be doing before hand to verify something has sync'd in AD before using this command?
I have a PS script that creates new AD groups then adds those new groups with Add-NTFSAccess. Most of the time the addition fails with this error:
Add-NTFSAccess : Cannot bind parameter 'Account'. Cannot convert value "" to type "Security2.IdentityReference2". Error: "The trust relationship between the primary domain and the trusted domain failed.
If I wait a bit I can issue the same Add-NTFSAccess and it works without issues. I tried adding a sleep delay which seems to help sometimes but still get the error. Is there a check I should be doing before hand to verify something has sync'd in AD before using this command?