The Set-WipeConfigcmdlet configures the properties of the wipe service.
You can configure how many times to retry wipe requests, whether they expire, when, and whether the wipe service should revoke the enrollment of a device if a wipe request is unsuccessful.
Note: |
---|
All properties are global and affect all wipe requests submitted after the property changes. This cmdlet does not affect previously submitted wipe requests. Previously submitted wipe requests keep the configuration settings that existed when they were created. To modify the configuration of a specific wipe request to an updated configuration, you must remove the wipe request and then resubmit it. |
Syntax
Set-WipeConfig [[-Instance] <WipeConfig>] [-ExpirationInterval <TimeSpan>] [-Retry <Int32>] [-EnableExpiration [<Boolean>]] [-DisenrollUnsuccessful [<Boolean>]] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] |
Parameters
The following describes the Set-WipeConfigcmdlet parameters.
- Instance <WipeConfig>
-
Accepts an instance of a WipeConfigobject.
- ExpirationInterval <TimeSpan>
-
Specifies the time before a wipe request expires. The time may range from one day to two years. The default value is fourteen days.
- Retry <Int32>
-
Specifies the number of times that the wipe service retries wipe request submissions after a wipe request failure on a device. The accepted values for this parameter are any integer value between 0 and 5. If the retry value is set to a non-integer between 0 and 5, the wipe service rounds this value to the closest integer.
- EnableExpiration <Boolean>
-
Specifies whether wipe requests will expire. If set to $true, the expiration time will be enforced. If set to $false, the expiration time will not be used and wipe requests will never expire. The default value is $true.
- DisenrollUnsuccessful <Boolean>
-
Specifies whether the wipe service should revoke the enrollment of managed devices for which the wipe request was unsuccessful, either failed or expired. This prevents an unsuccessfully wiped managed device from accessing company resources. However, after a managed device enrollment is revoked, a wipe request can no longer be submitted for that device. Successful wipe requests always revoke the enrollment of a device.
- Force
-
Suppresses the warning prompt that displays when Set-WipeConfigdiscovers an invalid wipe service setting on the server. If you specify Force, Set-WipeConfigautomatically replaces the invalid setting with the default value without waiting for user confirmation.
- 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 Mobile Device Manager (MDM) Shell prompt, type get-help about_commonparameters.
Input Type
The Set-WipeConfigcmdlet accepts a WipeConfigobject. To see all the properties for this object, at the MDM Shell prompt type, Get-WipeConfig | Get-Member.
Output Type
None
Examples
This sequence of commands example uses the Get-WipeConfigcmdlet, together with the Set-WipeConfigcmdlet, to change the expiration period to 180 days.
Copy Code | |
---|---|
C:\PS>$a = Get-WipeConfig C:\PS>$a.ExpirationInterval = New-TimeSpan -days 180 C:\PS>Set-WipeConfig $a |
This Set-WipeConfigcommand example performs the same function as the previous example, but directly uses the ExpirationIntervalparameter.
Copy Code | |
---|---|
C:\PS>Set-WipeConfig -ExpirationInterval (New-TimeSpan -days 180) |
This Set-WipeConfigcommand example sets the retry value to 5, and disables the wipe request expiration.
Copy Code | |
---|---|
C:\PS>Set-WipeConfig -Retry 5 -EnableExpiration $false |
Cmdlet Help
To view this information online, at the MDM Shell prompt, type:
get-help Set-WipeConfig -detailed, or get-help Set-WipeConfig -full