Invoke-GPUpdate

Invoke-GPUpdate

Schedule a remote Group Policy refresh (gpupdate) on the specified computer.

구문

Parameter Set: NonSyncSet
Invoke-GPUpdate [[-Computer] <String> ] [[-RandomDelayInMinutes] <Int32> ] [-AsJob] [-Boot] [-Force] [-LogOff] [-Target <String> ] [ <CommonParameters>]

Parameter Set: SyncSet
Invoke-GPUpdate [[-Computer] <String> ] [[-RandomDelayInMinutes] <Int32> ] [-AsJob] [-Boot] [-LogOff] [-Sync] [-Target <String> ] [ <CommonParameters>]

자세한 설명

The Invoke-GPUpdate cmdlet refreshes Group Policy settings, including security settings that are set on remote computers by scheduling the running of the Gpupdate command on a remote computer. You can combine this cmdlet in a scripted fashion to schedule the Gpupdate command on a group of computers.

The refresh can be scheduled to immediately start a refresh of policy settings or wait for a specified period of time, up to a maximum of 31 days. To avoid putting a load on the network, the refresh times will be offset by a random delay.

매개 변수

-AsJob

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Boot

Causes a computer restart after the Group Policy settings are applied. This is required for those Group Policy client side extensions (CSEs) that do not process Group Policy on a background update cycle, but do process Group Policy at computer startup, for example, per-computer Software Installation policy settings.

This parameter has no effect if there are no CSEs called that require a restart.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Computer<String>

Specifies the name of the computer for which to schedule a Group Policy refresh. You can specify the computer name in one of the following formats:

-- Full computer name (FQDN computer name); for example, computer-01.sales.contoso.com.

-- Fully qualified domain name (FQDN)\computer name; for example, sales.contoso.com\computer-01.

-- NetBIOS domain name\computer name; for example, sales\computer-01.

-- Computer name (host name): for example, computer-01.

If the computer name is not specified the computer, on which the Invoke-GPUpdate cmdlet was run, will have the Group Policy settings refreshed.

별칭

없음

필수 여부

false

위치

1

기본값

없음

파이프라인 입력 적용 여부

true (ByValue)

와일드카드 문자 허용 여부

false

-Force

Reapplies all policy settings. By default, Group Policy is only refreshed when policy settings have changed.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-LogOff

Causes a logoff after the policy settings have been updated. This is required for those Group Policy client-side extensions (CSEs) that do not process Group Policy on a background update cycle but do process Group Policy when a user logs on. Examples include per-user Software Installation policy settings and the Folder Redirection extension.

This parameter has no effect if there are no CSEs called that require a logoff.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-RandomDelayInMinutes<Int32>

Specifies the delay, in minutes that Task Scheduler will wait, with a random factor added to lower the network load, before running a scheduled Group Policy refresh.

You can specify a delay in from 0 minutes to a maximum of 44640 minutes (31 days):

-- A value of 0 will cause the Group Policy refresh to run as soon as the gpupdate task has been scheduled.

—A value in the range of 1 to the maximum value of 44640 minutes cause the Group Policy refresh to delay the specified number of minutes plus a random offset before starting the Group Policy refresh.

별칭

없음

필수 여부

false

위치

2

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Sync

Causes the next foreground Group Policy application to be done synchronously. Foreground Group Policy applications occur at computer startup and user logon. You can specify this for the user, computer or both using the Target parameter.

On a client computer, by default, Group Policy processes synchronously at computer startup and asynchronously at user logon.

On a server, by default Group Policy processes synchronously at computer startup and at user logon.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Target<String>

Specifies that only user or computer policy settings are refreshed. By default, both user and computer policy settings are refreshed. You can specify one of two allowable values for this parameter:

-- User

-- Computer

If the target parameter is not specified both user and computer policy settings will be refreshed.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • None

    This cmdlet does not take any object as input.

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • None

    Invoke-GPUpdate does not return an object.

참고

  • The Invoke-GPUpdate cmdlet does not support scheduling a Group Policy refresh for computers running Windows XP or earlier.

  • In order to successfully schedule a Group Policy refresh for computers using the Invoke-GPUpdate cmdlet, the following Firewall rules must be set on each client computer to allow the following connections:

    --Remote Scheduled Tasks Management (RPC)

    --Remote Scheduled Tasks Management (RPC-ERMAP)

    --Windows Management Instrumentation (WMI-IN)

예제

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This command schedules a Group Policy refresh on the computer on which you are running the Invoke-GPUpdate cmdlet.

PS C:\> Invoke-GPUpdate

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This command schedules a Group Policy refresh on a remote computer (CONTOSO\COMPUTER-02) which will only schedule to update the user policy settings in synchronous mode.

PS C:\> Invoke-GPUpdate -computer COMPUTER-02 -Target user -Sync