locked
Set-ADuser : The server was unable to process the request due to an internal error RRS feed

  • Question

  • 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       = "glen@fabrikam.com"
    $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
    

    Thursday, January 2, 2020 2:13 PM

All replies

  • 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:23 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:24 PM
  • Hi, Can you try this method:

    $EmailPrincipal  = "USER@COMPANY.LOCAL"
    $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"



    • Edited by F.ABASSI Thursday, January 2, 2020 2:26 PM
    Thursday, January 2, 2020 2:25 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 glen@fabrikam.com


    \_(ツ)_/


    • Edited by jrv Thursday, January 2, 2020 2:29 PM
    Thursday, January 2, 2020 2:28 PM
  • Hi, Can you try this method:

    $EmailPrincipal  = "USER@COMPANY.LOCAL"
    $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 2:32 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? 
    Thursday, January 2, 2020 3:36 PM
  • "from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the
    exception information back to the client"

    The instructions are very clear.  Set it on the AD server.

    First check the logs on the server.  I do not recommend changing anything. Contact your network Admins or a consultant to help you troubleshoot AD. 

    Post in AD forum for help with how to manage and troubleshoot AD internal issues.  Your issue has nothing to do with scripting.

    Thursday, January 2, 2020 3:50 PM