Adding AD to Server 2012 – Install-WindowsFeature

Home Forums Server Operating Systems Windows Server 2012 / 2012 R2 Adding AD to Server 2012 – Install-WindowsFeature

This topic contains 9 replies, has 5 voices, and was last updated by Avatar sebastian_hermann 3 weeks, 6 days ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • Avatar
    shadragon
    Member
    #164730

    Very annoying issue on an upgrade from 2008 R2 to W2012 on a DC. I was finally able to get DNS and DHCP installed, but AD is proving ridiculously hard.

    When using either the Server Manager wizard or PS, I get the error:

    The request to add or remove features on the specified server failed.
    The operation cannot be completed, because the server that you specified requires a restart.

    I have referenced MS, Technet and other forums and done the following suggested workarounds.

    1) Rebooted numerous times.

    2) Repaired the image using DISM (As you can see in the code below I did it just prior to installing AD.) This worked to get DNS and DHCP installed, but they only worked when logged on as local machine admin.

    3) In Local Policies –> User Rights Assignment in the Log on as a service setting, I added NETWORK, NETWORK SERVICE and SERVICE as valid operators. It also says to add IIS_WPG, but there is no such account on the machine.

    4) Domain Admin is in the Enterprise Admin security group and that is what I am logged in as when trying to install AD.

    None of the above worked and I cannot find any other workarounds to try.

    The command “Install-WindowsFeature AD-Domain-Services -IncludeManagementTools” results in the following.

    Windows PowerShell
    Copyright (C) 2013 Microsoft Corporation. All rights reserved.

    PS C:UsersAdministrator.DOMAIN> DISM /online /cleanup-image /restorehealth

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.16384

    Image Version: 6.3.9600.16384

    [==========================100.0%==========================]
    The restore operation completed successfully. The component store corruption was repaired.
    The operation completed successfully.
    PS C:UsersAdministrator.DOMAIN> Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
    Install-WindowsFeature : The request to add or remove features on the specified server failed.
    The operation cannot be completed, because the server that you specified requires a restart.
    At line:1 char:1
    + Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : DeviceError: (@{Vhd=; Credent…Name=localhost}:PSObject) [Install-WindowsFeature], Exce
    ption
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_Reboot_Required,Microsoft.Windows.ServerManager.Commands.AddWindow
    sFeatureCommand

    Success Restart Needed Exit Code Feature Result
    ——- ————– ——— ————–
    False No Failed {}[/CODE]

    This is not an uncommon issue from the numbers of forum posts I have read.

    Cheers

    Shad[CODE]Windows PowerShell
    Copyright (C) 2013 Microsoft Corporation. All rights reserved.

    PS C:UsersAdministrator.DOMAIN> DISM /online /cleanup-image /restorehealth

    Deployment Image Servicing and Management tool
    Version: 6.3.9600.16384

    Image Version: 6.3.9600.16384

    [==========================100.0%==========================]
    The restore operation completed successfully. The component store corruption was repaired.
    The operation completed successfully.
    PS C:UsersAdministrator.DOMAIN> Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
    Install-WindowsFeature : The request to add or remove features on the specified server failed.
    The operation cannot be completed, because the server that you specified requires a restart.
    At line:1 char:1
    + Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : DeviceError: (@{Vhd=; Credent…Name=localhost}:PSObject) [Install-WindowsFeature], Exce
    ption
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_Reboot_Required,Microsoft.Windows.ServerManager.Commands.AddWindow
    sFeatureCommand

    Success Restart Needed Exit Code Feature Result





    False No Failed {}[/CODE]

    This is not an uncommon issue from the numbers of forum posts I have read.

    Cheers

    Shad

    JeremyW
    JeremyW
    Moderator
    #271076

    Re: Adding AD to Server 2012 – Install-WindowsFeature

    After a reboot, check to see if there are any pending file operations:
    http://technet.microsoft.com/en-us/library/cc960241.aspx

    If there are, backup the key and then delete the values. Then try installing again.

    Avatar
    Anonymous
    #369402

    Re: Adding AD to Server 2012 – Install-WindowsFeature

    JeremyW;289068 wrote:
    After a reboot, check to see if there are any pending file operations:
    http://technet.microsoft.com/en-us/library/cc960241.aspx

    If there are, backup the key and then delete the values. Then try installing again.

    Thanks for the quick response.

    FileRenameOperations is blank. No keys in there save the (Default) one with no value.

    JeremyW
    JeremyW
    Moderator
    #271078

    Re: Adding AD to Server 2012 – Install-WindowsFeature

    Can you just do a clean install? (I think it was over 10 years ago that I did an in-place upgrade)

    Avatar
    Anonymous
    #369403

    Re: Adding AD to Server 2012 – Install-WindowsFeature

    JeremyW;289071 wrote:
    Can you just do a clean install? (I think it was over 10 years ago that I did an in-place upgrade)

    Hey Jeremy,

    From the numerous forums I have read this is not an install issue it is a Windows bug. Both virgin installs and upgrades have this problem. One guy had 6 new servers with identical hardware and 4 installed no problem, 2 had this issue, but he never said how he fixed it, if at all.

    I tend to not touch an MS OS until at least SP1 is out for this reason, but I’m being told too. I’d rather not burn another MS license # just to end up back here again.

    JeremyW
    JeremyW
    Moderator
    #271079

    Re: Adding AD to Server 2012 – Install-WindowsFeature

    Of the many builds I’ve done, I have not run into this issue.

    shadragon;289073 wrote:
    I’d rather not burn another MS license # just to end up back here again.

    Are you talking about activations? Because you can reinstall as much as you want with the same license. The number of activations does decrement but if you run out I believe you’ll just need to activate by phone if your reach that point.

    Or, if you’re using MAK, use VAMT for activations and then it won’t decrement the activation on a reinstall.
    http://technet.microsoft.com/library/ff686878.aspx

    Or use KMS http://technet.microsoft.com/library/ff793434.aspx

    Avatar
    Anonymous
    #369404

    Re: Adding AD to Server 2012 – Install-WindowsFeature

    Thanks Jeremy,

    After another day of frustration I formatted and reinstalled with no issues. Upgrading seems to introduce a pit of snakes.

    Cheers for the info.

    JeremyW
    JeremyW
    Moderator
    #271081

    Re: Adding AD to Server 2012 – Install-WindowsFeature

    Glad to help. 8)

    Avatar
    biggles77
    Spectator
    #213515

    Re: Adding AD to Server 2012 – Install-WindowsFeature

    Like Jeremy I also don’t do in-place upgrades. Oh so much easier to add a second DC and once replicated (and waiting a suitable amount of time) DCPROMO it down and do a clean install. It also gives you the chance to flash the BIOS and any RAID etc firmware you may have without the fear of it borking your machine (unlikely but I am a paranoid bastard :shock:).

    Avatar
    sebastian_hermann
    Participant
    #620799

    Hi,
    I have had the same problem as described above, after I upgraded I was not able to install some windows features, for example AD-Domain-Services .

    All the above mentioned fixes did not help, also the following did not help in my case:

    In C:\Windows run: lodctr /r
    If you get error then go to C:\Windows\SysWow64 and run the same command.

    When succelful run: winmgmt /resyncperf

    Restarted server and it was able to install.

    I was able to fix the issue by the following:

    Please check if there is PendingXmlIdentifier under the key HKEY_LOCAL_MACHINE\COMPONENTS. If yes, windows thinks there is pending job to do. Backup and delete this key and check if the issue persists.

    Found in:
    https://social.technet.microsoft.com/Forums/en-US/20bbb181-b432-4d78-8a7a-cbf2b4562104/installing-windows-feature-restart-pending?forum=winserver8gen

    Best regards
    Sebastian

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.