Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Domain wite update GPO using Powershell ====== gpupdate /target:computer gpupdate /force <code bash> #Get all computers $cn = Get-ADComputer -filt * #Get admin credentials $cred = Get-Credential iammred\administrator #Create sessions $session = New-PSSession -cn $cn.name -cred $cred #This will result in an error for each offline client #Run command icm -Session $session -ScriptBlock {gpupdate /force} #Check if executed OK icm -Session $session -ScriptBlock {Get-EventLog -LogName system -InstanceId1502 -Newest 1} #remove session remove-pssession $Session </code> windows/scripting/ps_gpupdate.txt Last modified: 2019/10/31 09:06by 127.0.0.1