The Set-MobilePolicyServiceConfigcmdlet sets the configuration of the Active Directory Group Policy service.
This cmdlet allows you to set the PolicyRefreshIntervalvalue, which specifies the time interval before the cached policy sets on the server are recalculated.
Note: |
---|
This parameter is global and affects all Group Policy services in the deployment. |
Syntax
Set-MobilePolicyServiceConfig [[-Config] <MobilePolicyServiceConfig>] [-PolicyRefreshInterval <TimeSpan>] [-confirm] [-whatif] [<CommonParameters>] |
Parameters
The following describes the Set-MobilePolicyServiceConfigcmdlet parameters.
- Config <MobilePolicyServiceConfig>
-
Accepts a MobilePolicyServiceConfigobject 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. The default value is eight hours. If the value contains a space or other special characters, enclose the string in quotation marks.
- WhatIf
-
Informs you of what changes would be made if the action were to be performed (the cmdlet is not executed).
- Confirm
-
Prompts you for confirmation before the cmdlet executes.
- CommonParameters
-
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, at the 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
None
Examples
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