Does Install-WindowsFeature force a reboot?

Welcome Forums General PowerShell Q&A Does Install-WindowsFeature force a reboot?

Viewing 2 reply threads
  • Author
    Posts
    • #226491
      Participant
      Topics: 2
      Replies: 0
      Points: 27
      Rank: Member

      Will running the below command on a non-dc server force a reboot?:

      Install-WindowsFeature RSAT-AD-PowerShell;

       

      Or will it just tell me to manually reboot later? Thank you. Trying to test powershell AD info commands on another server

    • #226500
      Participant
      Topics: 3
      Replies: 342
      Points: 1,130
      Helping Hand
      Rank: Community Hero

      Don’t forget about -whatif

      Install-WindowsFeature RSAT-AD-PowerShell -WhatIf
      What if: Continue with installation?
      What if: Performing installation for "[Remote Server Administration Tools] Active Directory module for Windows PowerShell".
      What if: Performing installation for "[Remote Server Administration Tools] AD DS and AD LDS Tools".
      What if: The target server may need to be restarted after the installation completes.
      
      Success Restart Needed Exit Code      Feature Result
      ------- -------------- ---------      --------------
      True    Maybe          Success        {Active Directory module for Windows Power...
      

      On my test server it did not.

      Install-WindowsFeature RSAT-AD-PowerShell
      
      Success Restart Needed Exit Code      Feature Result
      ------- -------------- ---------      --------------
      True    No             Success        {Active Directory module for Windows Power...
      
    • #226506
      Participant
      Topics: 0
      Replies: 2
      Points: 31
      Rank: Member

      If you don’t want it to restart the server you can run it as follows:

      Install-WindowsFeature -Name RSAT-AD-Powershell -Restart:$false

       

Viewing 2 reply threads
  • You must be logged in to reply to this topic.