Set-DeviceManagementConfig
2/9/2009
The Set-DeviceManagementConfig cmdlet 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-DeviceManagementConfig cmdlet parameters.
- Config <DeviceManagementConfig>
Accepts a DeviceManagementConfig object as input.
- ConnectInterval <TimeSpan>
Global device connect interval specified as a .NET TimeSpan object. 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 TimeSpan object, 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 TimeSpan object, 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 DisenrollInterval is enabled. If set to $true, then a device enrollment is revoked after a period of inactivity that is defined by the DisenrollInterval value. 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 ExpirationInterval is enabled. If set to $true, then devices are marked for removal after a period of inactivity that is defined by the ExpirationInterval value. 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 EnableExpiration parameter 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 PurgeInterval is enabled. If set to $true, then a device is removed from the Device Registration database after a period of time defined by the PurgeInterval value. 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 HistoryDuration is not an even number of days. The HistoryDuration value 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-DeviceManagementConfig cmdlet accepts a DeviceManagementConfig object. To see all the properties for this object, at the MDM Shell prompt type, Get-DeviceManagementConfig | Get-Member.
Output Type
None
Examples
This Set-DeviceManagementConfig command example uses the TimeSpan object string to set the ConnectInterval period to eight hours.
C:\PS>Set-DeviceManagementConfig -ConnectInterval "08:00:00"
This Set-DeviceManagementConfig command example uses the New-TimeSpan cmdlet to set the ConnectInterval period to eight hours.
C:\PS>Set-DeviceManagementConfig -ConnectInterval (New-TimeSpan -hours 8)
This sequence of commands uses Get-DeviceManagementConfig together with Set-DeviceManagementConfig to change the ConnectInterval period to 10 hours.
C:\PS>$a = Get-DeviceManagementConfig
C:\PS>$a.ConnectInterval = New-TimeSpan -hours 10
C:\PS>Set-DeviceManagementConfig $a
This SetDeviceManagementConfig command 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.
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