The Set-MobilePolicyServiceConfigcmdlet sets the configuration of the Active Directory Group Policy service.

Sets of Active Directory Group Policies cached on the server recalculate when the PolicyRefreshIntervaltimeframe elapses.

These parameters are global and affect all Group Policy services in the deployment.


Set-MobilePolicyServiceConfig [[-Instance]
<MobilePolicyServiceConfig>] [-PolicyRefreshInterval
<TimeSpan>] [-WhatIf] [-Confirm] [<CommonParameters>]


The following describes the Set-MobilePolicyServiceConfigcmdlet parameters.

Instance <MobilePolicyServiceConfig>

Accepts a MobilePolicyServiceConfiginstance as input.

PolicyRefreshInterval <TimeSpan>

Specifies the time before cached policy sets on the server recalculate. The valid values for this parameter are .NET TimeSpanobjects that represent a time between one hour and seven days.


Informs you of what changes would be made if the action were to be performed (the cmdlet is not executed).


Prompts you for confirmation before the cmdlet executes.


This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, at the Mobile Device Manager (MDM) Shell prompt, type, get-help about_commonparameters.

Input Type

The Set-MobilePolicyServiceConfigcmdlet accepts a MobilePolicyServiceConfigobject. To see all the properties for this object, at the MDM Shell prompt, type Get-MobilePolicyServiceConfig | Get-Member.

Output Type



This sequence of commands example uses the Get-MobilePolicyServiceConfigcmdlet together with the Set-MobilePolicyServiceConfigcmdlet to change the PolicyRefreshIntervaltime to 12 hours.

Copy Code
C:\PS>$a = Get-MobilePolicyServiceConfig 
C:\PS>$a.PolicyRefreshInterval = New-TimeSpan -hours 12 
C:\PS>Set-MobilePolicyServiceConfig $a

Cmdlet Help

To view this information online, at the MDM Shell prompt, type:

get-help Set-MobilePolicyServiceConfig -detailed, or get-help Set-MobilePolicyServiceConfig -full

See Also