locked
Uninstall-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell -Restart RRS feed

  • Question

  • Hi

    Case:

    Windows 2012 standard server installed with Gui as a Virtual server on HyperV.

    I want to remove the Gui on the server with following:

    - Open Powershell as administrator

    - run "Uninstall-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell -Restart"

    but it is timing out with following error:

    PS C:\Windows\system32> Uninstall-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell -Restart
    Uninstall-WindowsFeature : The server could not update the provided feature files in the time allowed.
    At line:1 char:1
    + Uninstall-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell -Restart
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationTimeout: (a4005b40-3de7-49ba-8453-105fde40387c:Guid) [Uninstall-WindowsFeature]
       , Exception
        + FullyQualifiedErrorId : GetAlterationState__CallCycleTimeout,Microsoft.Windows.ServerManager.Commands.RemoveWind
       owsFeatureCommand

    Success Restart Needed Exit Code      Feature Result
    ------- -------------- ---------      --------------
    False   No             Failed         {}


    PS C:\Windows\system32>

    I have tryed following command:

    Uninstall-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell -WhatIf

    with succes, everything was ok

    I have also tryed via Server Manager under feature to remove "Graphical Management Tools and Infrastructur" and "Server Graphical Shell" but after 24 hours I was giving up and stopping the process.

    A hint would be nice

    John B

    Monday, April 20, 2020 3:29 PM

Answers

  • Hi

    I have fixed the problem by reinstalling and I can now remove / add Windows 2012 GUI as it suits me :-)

    Have a nice day

    Best Regards

    John B

    • Marked as answer by ms-support Monday, May 4, 2020 6:33 AM
    Monday, May 4, 2020 6:33 AM

All replies

  • Something here might help.

    https://devblogs.microsoft.com/scripting/use-powershell-to-remove-the-gui-on-windows-server-2012/

    but also note this process was wrought with errors and this functionality was removed in later version of windows. Better option is to stand up a new core instance, patch fully and migrate the roles or applications over to it.

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Monday, April 20, 2020 4:24 PM
  • Hi Dave

    thanks for your reply :-)

    It did not help, when I am using following commands:

    PS C:\> ipmo servermanager
    PS C:\> gcm -mo servermanager
    Get-WindowsFeature -ComputerName Win2K12 -Name *gui* -Credential domain\administrator
    Get-WindowsFeature *gui* | Uninstall-WindowsFeature –Restart

    the first 3 commands work perfectly and come up with the right answers, but when I use line 4 it hangs again and will not proceed.

    A hint would be nice

    Best Regards

    John B

    Monday, April 20, 2020 5:29 PM
  • I'd start a case here with product support.

    https://support.microsoft.com/en-us/hub/4343728/support-for-business

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Monday, April 20, 2020 5:41 PM
  • Hi

    I have fixed the problem by reinstalling and I can now remove / add Windows 2012 GUI as it suits me :-)

    Have a nice day

    Best Regards

    John B

    • Marked as answer by ms-support Monday, May 4, 2020 6:33 AM
    Monday, May 4, 2020 6:33 AM