10/17/2008

The Set-DeviceManagementConfigcmdlet sets the global device management configuration values.

Syntax

Set-DeviceManagementConfig [-ConnectInterval <TimeSpan>]
[-DisenrollInterval <TimeSpan>] [-EnableDisenroll
<Boolean>] [-EnableExpiration <Boolean>] [-EnablePurge
<Boolean>] [-ExpirationInterval <Timespan>]
[-HistoryDuration <TimeSpan>] [-OMASessionTimeout
<TimeSpan>] [-PurgeInterval <Timespan>] [-Force]
[-confirm] [-whatif] [<CommonParameters>]

Set-DeviceManagementConfig [[-Config]
<DeviceManagementConfig>] [-Force] [-confirm] [-whatif]
[<CommonParameters>]

Parameters

The following describes the Set-DeviceManagementConfigcmdlet parameters.

Config <DeviceManagementConfig>

Accepts a DeviceManagementConfigobject as input.

ConnectInterval <TimeSpan>

Global device connect interval specified as a .NET TimeSpanobject. The value may range from one minute to one year. The default value is 8 hours. If the value contains a space or other special characters, enclose the string in quotation marks.

HistoryDuration <TimeSpan>

The period, specified as a .NET TimeSpanobject, to keep device history data for reporting. The value must be specified as an even number of days and may range from 0 to 30 days. The default value is 7 days. If the value contains a space or other special characters, enclose the string in quotation marks.

OMASessionTimeout <TimeSpan>

Device management (DM) session time-out value, specified as a .NET TimeSpanobject, for Mobile Device Manager Device Management Server. The value may range from 10 seconds to 20 minutes. The default value is 8 minutes. If the value contains a space or other special characters, enclose the string in quotation marks.

EnableDisenroll <Boolean>

Specifies whether DisenrollIntervalis enabled. If set to $true, then a device enrollment is revoked after a period of inactivity that is defined by the DisenrollIntervalvalue. If set to $false, then device enrollments are not revoked after a period of inactivity. The default value is $false.

DisenrollInterval <TimeSpan>

Specifies the length of time a device may be inactive before its enrollment is revoked. The value may range from one day to 732 days. The default value is 90 days. If the value contains a space or other special characters, enclose the string in quotation marks.

EnableExpiration <Boolean>

Specifies whether ExpirationIntervalis enabled. If set to $true, then devices are marked for removal after a period of inactivity that is defined by the ExpirationIntervalvalue. If set to $false, then devices are not marked for removal after a period of inactivity. The default value is $false. Devices marked for removal may be deleted from the Device Registration database by using the MDM Device Enrollment Cleanup Tool.

ExpirationInterval <Timespan>

Specifies the length of time a device may be inactive before it is marked for removal in the Device Registration database (see the EnableExpirationparameter for more information). The value may range from one day to 60 days. The default value is 30 days. If the value contains a space or other special characters, enclose the string in quotation marks.

EnablePurge <Boolean>

Specifies whether PurgeIntervalis enabled. If set to $true, then a device is removed from the Device Registration database after a period of time defined by the PurgeIntervalvalue. If set to $false, then devices are not automatically removed from the Device Registration database. The default value is $true.

PurgeInterval <Timespan>

Specifies the length of time after which devices that are no longer enrolled are completely removed from the Device Registration database. The value may range from one day to 3660 days. The default value is 373 days. If the value contains a space or other special characters, enclose the string in quotation marks.

Force

Suppresses the prompt that displays if the value you specify for HistoryDurationis not an even number of days. The HistoryDurationvalue is rounded down to the nearest even number of days.

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-DeviceManagementConfigcmdlet accepts a DeviceManagementConfigobject. To see all the properties for this object, at the MDM Shell prompt type, Get-DeviceManagementConfig | Get-Member.

Output Type

None

Examples

This Set-DeviceManagementConfigcommand example uses the TimeSpanobject string to set the ConnectIntervalperiod to eight hours.

Copy Code
C:\PS>Set-DeviceManagementConfig -ConnectInterval "08:00:00"

This Set-DeviceManagementConfigcommand example uses the New-TimeSpancmdlet to set the ConnectIntervalperiod to eight hours.

Copy Code
C:\PS>Set-DeviceManagementConfig -ConnectInterval (New-TimeSpan
-hours 8)

This sequence of commands uses Get-DeviceManagementConfigtogether with Set-DeviceManagementConfigto change the ConnectIntervalperiod to 10 hours.

Copy Code
C:\PS>$a = Get-DeviceManagementConfig 
C:\PS>$a.ConnectInterval = New-TimeSpan -hours 10 
C:\PS>Set-DeviceManagementConfig $a

This SetDeviceManagementConfigcommand example configures all devices to be disenrolled automatically if they have not had an Open Mobile Alliance Device Management (OMA DM) session in the last 60 days. When a device is disenrolled, the device certificates are revoked, the device account is removed from Active Directory, and the device is placed on the block list.

Copy Code
C:\PS>Set-DeviceManagementConfig –EnableDisenroll $true
–DisenrollInterval "60.00:00:00"

Cmdlet Help

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

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

See Also