gpupdate
command is used to update Group policies in Windows operating system Domain. There are different options to use with the gpupdate
but one of the most used option is /force
which will reapply all policy settings.Get Help
/?
option like below. This will list options and option explanation of the “gpupdate” command.Force Only
Update Only User Policies
/Target:User
options to the “gpupdate” command like below.Update Only Computer Policies
/Target:Computer
like below.Force and Reboot
/boot
next to the option /force
like below.Force and Logoff Account
/logoff
option after the option /force
like below.Set Timeout To Force gpupdate
/w
option and provide a time.120
seconds in order to complete a group policy update.Force gpupdate with PowerShell
gpupdate
command can be used in PowerShell too. We can use -force
option like below with Invoke-GPUpdate
command.KB ID 0001353
Problem
I’ve seen this asked a lot in forums, and it came up on EE again today. I’ve never had to set this up in the past, but I’ve posted the links to the correct Cisco articles when people have asked.
After the question was asked again today, I thought I’d take the time to write a decent article on how to do it.
Why would you want to do this? You might want to map/reconnect a mapped drive, or perform anything thats usually acheivable with a login script.
Solution
1. First make sure you have your script, I’m using a simple batch file but you can also use .vbs. As you can see my script just maps a drive (s:) to a network share on the machine you are looking at.