Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, January 2, 2020 2:13 PM
I'm not able to modify AD objects with the Set-ADuser command. I keep getting the same internal error anyway that I run this command. I'm running it as an administrator and it's not making any difference. Any help would be appreciated.
PS C:\Users\test_user\Desktop> $User = Get-ADUser -Identity $test_user -Properties mail,department
$User.mail = "[email protected]"
$User.department = "Accounting"
Set-ADUser -Instance $User
Set-ADUser : The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults
(either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the
exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.
At line:4 char:1
+ Set-ADUser -Instance $User
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-ADUser], ADException
+ FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.SetADUser
All replies (6)
Thursday, January 2, 2020 2:23 PM
You need to follow the instructions in the error message. Have you done that?
Note that this is not a help desk for server issues.
\(ツ)_/
Thursday, January 2, 2020 2:24 PM
What's the full path of the OU? A Google search seems to suggest that if the OU has a "/" in the name, PowerShell seemingly barfs.
Thursday, January 2, 2020 2:25 PM
Hi, Can you try this method:
$EmailPrincipal = "[email protected]"
$UserEmails = @("SMTP:$EmailPrincipal")
$DomainController = "YOUR-DC"
$SamAccountName = "YOURUSERSAMACCOUNTNAME"
Set-ADUser -Identity $SamAccountName -Server $DomainController -Replace @{proxyAddresses=$UserEmails}
"Vote or mark as answer if you think useful" "Marquer comme réponse les réponses qui ont résolu votre problème"
Thursday, January 2, 2020 2:28 PM
What's the full path of the OU? A Google search seems to suggest that if the OU has a "/" in the name, PowerShell seemingly barfs.
There is no OU here. The object is found using the objectGUID and not via the path. Only the altered properties will be used.
A test of the user would be -
Set-ADUser $test_User -Department Acounting -EmailAddress [email protected]
\(ツ)_/
Thursday, January 2, 2020 2:32 PM
Hi, Can you try this method:
$EmailPrincipal = "[email protected]" $UserEmails = @("SMTP:$EmailPrincipal") $DomainController = "YOUR-DC" $SamAccountName = "YOURUSERSAMACCOUNTNAME" Set-ADUser -Identity $SamAccountName -Server $DomainController -Replace @{proxyAddresses=$UserEmails}
"Vote or mark as answer if you think useful" "Marquer comme réponse les réponses qui ont résolu votre problème"
That does not set what the OP is asking for. It will not change the mail address and is only valid for Exchange properties.
There is a small chance that the proxy addresses are corrupt but this won't fix them. For all current versions of AD and Exchange the addresses should never be able to be corrupted - at least in my experience I have not been able to corrupt them like could happen in W2K and W2K3.
\(ツ)_/
Thursday, January 2, 2020 3:36 PM
You are right, I need to follow the instructions to get more information on this error. It looks like I need to set "includeExceptionDetailInFaults" to true. I can't seem to find the config file to make that change. Any idea where I can set this for my PowerShell script to get the detailed error?