Canceling a Windows feature configuration

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 5 months, 4 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37117
    Profile photo of Tim Curwick
    Tim Curwick
    Participant

    I was running Add-WindowsFeature RSAT-AD-PowerShell on a bunch of 2008 R2 servers today and two of them threw the following error:

    "Add-WindowsFeature : A configuration started by Contoso\UserA is currently in progress. Before you can start a configuration, Contoso\UserA must log in to complete the current configuration or the configuration in progress must be cancelled."

    Get-WindowsFeature failed with the same error.

    Finding out who UserA was, what they were trying to configure, or getting them to log in and do something was not practical. Restarting the servers did not help.

    A quick Google told me that if I went into Server Manager and kicked off the Add Function wizard manually, I would get a check box to cancel the pending configuration. So I manually canceled the pending configurations and completed my install.

    I would like to make my scripts able to handle this particular error. Does anyone know a way to use PowerShell in such a situation to find out what is pending and to cancel the pending operation?

    #37118
    Profile photo of Don Jones
    Don Jones
    Keymaster

    I don't think you see that behavior in Win2012R2 – so Microsoft's answer to this would be, "upgrade." We're not likely to see them retrofit to 2008R2, unfortunately.

    #37130
    Profile photo of Tim Curwick
    Tim Curwick
    Participant

    Unfortunately, despite our best advice to the contrary, we usually end up writing the script the client wants rather than helping them build the system they need.

    #37135
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Oh, I understand completely – was just trying to point out that you're probably unlikely to find a good solution in this case. It was a known problem in 2008R2, and fixed later, but the fix wasn't back-ported. In this case, I think you'd end up having to somehow manually hack the Windows Installer database, although I'm not even sure how you'd go about doing so.

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

You must be logged in to reply to this topic.