PowerShell folder permission error - Some or all identity references could not be translated.

后端 未结 4 1812
长发绾君心
长发绾君心 2020-12-18 22:03

I have read many posts about this, but I still can\'t get it. I am running this script as Admin and It does create the folders requred, just does not set the appropriate per

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-18 22:35

    a gotch with the user ID is that AD truncates the username, so a user with a long name "j_reallylongname" will have a samid (Security Account Manager (SAM) account name) which is truncated. (j_reallylong)

    so when fetching usernames, make sure you verify against the AD before using it.

    When i've got the upns, so i run a dsget query to get the samid then use that to build the identity reference.

提交回复
热议问题