locked
gpupdate /force RRS feed

  • Question

  • I'd like to run the command gpupdate /force on a remote system and display the results using powershell.
    Thursday, December 19, 2013 6:16 PM

Answers

  • PS C:\scripts> Enter-PSSession ws701
    [ws701]: PS C:\Users\testadmin\Documents> gpupdate /force
    Updating Policy...
    
    
    
    User Policy update has completed successfully.
    
    Computer Policy update has completed successfully.
    
    
    
    [ws701]: PS C:\Users\testadmin\Documents>


    ¯\_(ツ)_/¯

    • Proposed as answer by jrv Thursday, December 19, 2013 6:22 PM
    • Marked as answer by Andrew Barnes Thursday, December 19, 2013 9:06 PM
    Thursday, December 19, 2013 6:22 PM

All replies

  • PS C:\scripts> Enter-PSSession ws701
    [ws701]: PS C:\Users\testadmin\Documents> gpupdate /force
    Updating Policy...
    
    
    
    User Policy update has completed successfully.
    
    Computer Policy update has completed successfully.
    
    
    
    [ws701]: PS C:\Users\testadmin\Documents>


    ¯\_(ツ)_/¯

    • Proposed as answer by jrv Thursday, December 19, 2013 6:22 PM
    • Marked as answer by Andrew Barnes Thursday, December 19, 2013 9:06 PM
    Thursday, December 19, 2013 6:22 PM
  • WS2012 GPMC or Windows 8.xwith RSAT

    http://technet.microsoft.com/en-us/library/jj134201.aspx


    ¯\_(ツ)_/¯

    Thursday, December 19, 2013 6:24 PM
  • Thank you for your response. I'm at the bottom of the learning curve on this so I apologize for my ignorance but I don't understand what you're trying to tell me in the above answer.
    Thursday, December 19, 2013 6:52 PM
  • Hi,

    Enter-PSSession is used to create an interactive session on a remote PC:

    http://ss64.com/ps/enter-pssession.html


    Don't retire TechNet! - (Don't give up yet - 12,420+ strong and growing)

    Thursday, December 19, 2013 7:41 PM
  • PS C:\scripts> Enter-PSSession ws701



    The first command uses the Enter-PSSession cmdlet to start an interactive session with ws701, a remote computer. When the session starts, the command prompt changes to include the computer name.

    [ws701]: PS C:\Users\testadmin\Documents> gpupdate /force


    The second command refreshes local and Active Directory-based Group Policy settings. The command is run on the remote computer.

    Hope this helps.

    /Andrew


    Blog: http://scriptimus.wordpress.com

    Thursday, December 19, 2013 9:06 PM
  • Thank you for the response. I was able to run the command as suggested with expected results but only after I logged on the system and enabled winrm. Is there a way to enable winrm remotely with PS?
    Thursday, December 19, 2013 9:11 PM
  • Thank you for the response. I was able to run the command as suggested with expected results but only after I logged on the system and enabled winrm. Is there a way to enable winrm remotely with PS?

    It is best and easiest to enable it with Group Policy, Select computer\administrative templates and remoting I believe. Take all of the defaults and wait. You will likely have to reboot some machines.

    http://msdn.microsoft.com/en-us/library/aa384372(v=vs.85).aspx

    Scroll to bottom


    ¯\_(ツ)_/¯



    • Edited by jrv Thursday, December 19, 2013 9:17 PM
    Thursday, December 19, 2013 9:15 PM
    • Edited by jrv Thursday, December 19, 2013 9:16 PM
    Thursday, December 19, 2013 9:16 PM