Force a Domain-Wide Update of Group Policy with PowerShell

run powershell

$cn = Get-ADComputer -filt *

$cred = Get-Credential iammred\administrator

$session = New-PSSession -cn $cn.name -cred $cred

$session

icm -Session $session -ScriptBlock {gpupdate /force}

icm -Session $session -ScriptBlock {Get-EventLog -LogName system -InstanceId1502 -Newest 1}

 

Force a Domain-Wide Update of Group Policy with PowerShell

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.