Powershell: Gpupdate
$argString = $arguments -join " " Write-Verbose "Running: gpupdate $argString"
Invoke-GPUpdate -Target Computer -Force -Verbose 4. Using Group Policy Cmdlets (RSAT) If you have Group Policy Management Console (RSAT) installed, use these PowerShell cmdlets. Import the module Import-Module GroupPolicy Key Cmdlets | Cmdlet | Purpose | |--------|---------| | Invoke-GPUpdate | Remotely triggers gpupdate on computers | | Get-GPResultantSetOfPolicy | Generates RSOP report (HTML/XML) | | Get-GPRegistryValue | Reads registry-based policy settings | | Set-GPRegistryValue | Configures registry policy | | Get-GPInheritance | Shows OU policy inheritance | Examples Remote gpupdate gpupdate powershell
function Invoke-GPUpdate [CmdletBinding()] param ( [ValidateSet("Computer", "User", "Both")] [string]$Target = "Both", [switch]$Force, [switch]$Logoff, [switch]$Boot, [int]$WaitSeconds = 600, [switch]$Sync ) $arguments = @() if ($Target -ne "Both") $arguments += "/target:$($Target.ToLower())" if ($Force) $arguments += "/force" if ($Logoff) $arguments += "/logoff" if ($Boot) $arguments += "/boot" if ($Sync) $arguments += "/sync" $arguments += "/wait:$WaitSeconds" $argString = $arguments -join " " Write-Verbose "Running:

Ostoskori on tyhjä.