Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

New-ADUser "access to the attribute is not permitted"

$
0
0

The following code produces the error "New-ADUser : Access to the attribute is not permitted because the attribute is owned by the Security Accounts Manager (SAM)"

$user = Get-ADUser -Identity richard.kavanagh -Properties *

New-ADUser -SamAccountName "test.rich" -Instance $user -Name "Test Rich" -PasswordNotRequired $true

Thanks.

Rich.

OK I've figured out that the -Instance argument is the problem but it's supposed to be allowed so not sure why?

Viewing all articles
Browse latest Browse all 21975

Trending Articles