locked
How to stop gpupdate /force from asking press Y / N to restart computer in cmd? RRS feed

  • Question

  • Each time after gpupdate /force finish to refresh the policy in cmd it popup a message press Y / N to restart computer after pressed Y it popup a dialogbox press O.K to restart PC.

    How to prevent gpudate /force from asking press Y / N and then dialogbox popup asking for restart pc?

    Friday, July 5, 2013 7:59 PM

Answers

  • Hello,

    As a additional info, save this as a .cmd, for example gpupdate.cmd (for yes echo y, for no echo n):

    CD C:\Windows\System32
    echo y | gpupdate /force /wait:0
    exit

    Regards


    • Edited by Patris_70 Friday, July 5, 2013 8:56 PM added: for yes echo y, for no echo n
    • Marked as answer by QuestionJunk Monday, July 8, 2013 5:51 PM
    Friday, July 5, 2013 8:55 PM
  • Try the VBS script available here.

    • Marked as answer by QuestionJunk Monday, July 8, 2013 5:51 PM
    Friday, July 5, 2013 8:46 PM

All replies

  • Try the VBS script available here.

    • Marked as answer by QuestionJunk Monday, July 8, 2013 5:51 PM
    Friday, July 5, 2013 8:46 PM
  • Hello,

    As a additional info, save this as a .cmd, for example gpupdate.cmd (for yes echo y, for no echo n):

    CD C:\Windows\System32
    echo y | gpupdate /force /wait:0
    exit

    Regards


    • Edited by Patris_70 Friday, July 5, 2013 8:56 PM added: for yes echo y, for no echo n
    • Marked as answer by QuestionJunk Monday, July 8, 2013 5:51 PM
    Friday, July 5, 2013 8:55 PM
  • Hi Patris,

    Yeah man your trick is working.

    Regard,

    thanks.

    Monday, July 8, 2013 5:50 PM
  • Hi Tomas,

    After followed the steps from the link provided by you is working perfectly.

    Regard,

    Thanks.

    Monday, July 8, 2013 5:51 PM
  • Hi Patris,

    I have a similar situation. In my organisation we are mapping network drives and pushing group policies (pardon me as I have limited knowledge about it) by invoking batch files upon user logon. But it falls over at  gpupdate force command, how do I use your code in my scenario? Could you please help? 

    Thanks in advance

    Wednesday, October 1, 2014 9:46 AM
  • "gpupdate /force /wait:0"
     

    Martin

    Mal ein GUTES Buch über GPOs lesen?

    NO THEY ARE NOT EVIL, if you know what you are doing: Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))
    • Proposed as answer by Patris_70 Monday, October 20, 2014 1:28 PM
    Wednesday, October 1, 2014 11:00 AM