none
Can't uninstall Active Directory Domain Services 2012R2 RRS feed

  • Question

  • Hello,

    We have a server that had Active Directory Domain Services installed on it, but it was never made into a DC. When we try to uninstall this role the following error is produced.

    The term 'Invoke-_InternalADDSIsDC' is not recongized as the name of a cmdlet, function,script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    I am trying to remove the role from the Remove Roles and Features Wizard.

    Has anyone run into this before?

    Thanks


    Tuesday, April 26, 2016 1:33 PM

Answers

  • Or the simplest method might be to simply re-install.  Re-installation takes about 30 minutes.  If you have started using automation to deploy your systems, it is a matter of submitting a script file, walking away, and coming back to a completely new system.

    Yes, I understand it is good to find the root cause.  But I have come to the conclusion that for one-off things like this, where something may have been done improperly at some point in time, it is a lot less frustrating, and time wasting, to simply rebuild.


    . : | : . : | : . tim

    • Proposed as answer by Nilesh_1 Wednesday, April 27, 2016 12:30 PM
    • Marked as answer by Hello_2018Moderator Thursday, May 5, 2016 9:20 AM
    Wednesday, April 27, 2016 12:19 PM

All replies

  • Hi

     first install ADDS module on server,

    import-module ADDSDeployment

    then run

    uninstall-WindowsFeature AD-Domain-Services

    Also you can check the powershell command details this link ; https://technet.microsoft.com/en-us/library/jj574104.aspx


    This posting is provided AS IS with no warranties or guarantees,and confers no rights. Best regards Burak Uğur

    Tuesday, April 26, 2016 1:36 PM
  • Hello,

    Unfortunately, the addsdeployment module can't be found when I try to run that command. Should I try to reinstall the AD-Domain-Services feature again to see if it will install that module?

    Thanks

    Tuesday, April 26, 2016 3:34 PM
  • Hi

     try to run the command below,

     Install-windowsfeature -name AD-Domain-Services –IncludeManagementTools

    then the others


    This posting is provided AS IS with no warranties or guarantees,and confers no rights. Best regards Burak Uğur

    Tuesday, April 26, 2016 4:11 PM
  • Okay, tried that and got this error.

    install-windowsfeature : The request to add or remove features on the specified server failed.
    Installation of one or more roles, role services, or features failed.
    Transaction support within the specified resource manager is not started or was shut down due to an error. Error:
    0x80071a91
    At line:1 char:1
    + install-windowsfeature -name ad-domain-services -includemanagementtools
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
        Exception
        + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWind
       owsFeatureCommand

    Tuesday, April 26, 2016 4:44 PM
  • Hi Sean,

    We have a server that had Active Directory Domain Services installed on it, but it was never made into a DC. When we try to uninstall this role the following error is produced. The term 'Invoke-_InternalADDSIsDC' is not recongized as the name of a cmdlet, function,script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. I am trying to remove the role from the Remove Roles and Features Wizard. Has anyone run into this before?

    I have test this on my server, it is very simple:

    get-WindowsFeature AD-Domain-Services | uninstall-windowsFeature

    Restart the server.

    After restarting I re-install the ADDS, found no specific settings, just step-by-step.

    But please note that my .netframework 3.5&4.5 have already installed by default.

    Note: run this command as admin.

    Best regards,


    Andy_Pan

    Wednesday, April 27, 2016 7:40 AM
    Moderator
  • Hello,

    I still ran into the same error as I posted before. For some reason it seems like the AD Domain Services feature didn't install fully, and when I try to re-install it, all I get is errors. 

    PS C:\Windows\system32> get-windowsfeature ad-domain-services | uninstall-windowsfeature

    Success Restart Needed Exit Code      Feature Result
    ------- -------------- ---------      --------------
    False   Maybe          Failed         {}
    uninstall-windowsfeature : A prerequisite check for the AD-Domain-Services feature failed.
    1. The term 'Invoke-_InternalADDSIsDc' is not recognized as the name of a cmdlet, function, script file, or operable
    program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:41
    + get-windowsfeature ad-domain-services | uninstall-windowsfeature
    +                                         ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (Active Directory Domain Services:ServerComponentWrapper) [Uninstall-W
       indowsFeature], Exception
        + FullyQualifiedErrorId : Alteration_PrerequisiteCheck_Failed,Microsoft.Windows.ServerManager.Commands.RemoveWindo
       wsFeatureCommand

    That is the error I got.

    Wednesday, April 27, 2016 11:07 AM
  • Okay, tried that and got this error.

    install-windowsfeature : The request to add or remove features on the specified server failed.
    Installation of one or more roles, role services, or features failed.
    Transaction support within the specified resource manager is not started or was shut down due to an error. Error:
    0x80071a91
    At line:1 char:1
    + install-windowsfeature -name ad-domain-services -includemanagementtools
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
        Exception
        + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWind
       owsFeatureCommand

    Hi

     First run chkdsk /r /f and sfc /scannow to fix,

    If issue still persist,Try the installation pointing the source to the sxs folder on the installation media..


    This posting is provided AS IS with no warranties or guarantees,and confers no rights. Best regards Burak Uğur

    Wednesday, April 27, 2016 11:31 AM
  • Or the simplest method might be to simply re-install.  Re-installation takes about 30 minutes.  If you have started using automation to deploy your systems, it is a matter of submitting a script file, walking away, and coming back to a completely new system.

    Yes, I understand it is good to find the root cause.  But I have come to the conclusion that for one-off things like this, where something may have been done improperly at some point in time, it is a lot less frustrating, and time wasting, to simply rebuild.


    . : | : . : | : . tim

    • Proposed as answer by Nilesh_1 Wednesday, April 27, 2016 12:30 PM
    • Marked as answer by Hello_2018Moderator Thursday, May 5, 2016 9:20 AM
    Wednesday, April 27, 2016 12:19 PM
  • Hey Tim,

    Yes, at this point the server is alive and doing it's job so we have decided to let it be, but I was just curious if there was a fix out there. The second option was to re-image as that would indeed save a lot of time.

    Thanks

    Wednesday, April 27, 2016 12:33 PM
  • Hi

     first install ADDS module on server,

    import-module ADDSDeployment

    then run

    uninstall-WindowsFeature AD-Domain-Services

    Also you can check the powershell command details this link ; https://technet.microsoft.com/en-us/library/jj574104.aspx


    This posting is provided AS IS with no warranties or guarantees,and confers no rights. Best regards Burak Uğur

    Worked like a champ.. AFTER I right-clicked / Run As Administrator on PowerShell 

    Thanks

    Burak

    Tuesday, November 12, 2019 9:32 PM