UWF_Servicing
This class contains properties and methods that enable you to query and control Unified Write Filter (UWF) servicing mode.
class UWF_Servicing {
[key, read] boolean CurrentSession;
[read] boolean ServicingEnabled;
UInt32 Enable();
UInt32 Disable();
UInt32 UpdateWindows(
[out] UInt32 UpdateStatus
);
};
The following tables list the methods and properties that belong to this class.
Method | Description |
---|---|
UWF_Servicing.Disable | Disables Unified Write Filter (UWF) servicing mode. The system leaves servicing mode in the next session that follows a restart. |
UWF_Servicing.Enable | Enables Unified Write Filter (UWF) servicing mode. The system enters servicing mode in the next session that follows a restart. |
UWF_Servicing.UpdateWindows | Calls Windows Update to download and install critical and security updates for your device running Windows 10 Enterprise. |
Property | Data type | Qualifiers | Description & |
---|---|---|---|
CurrentSession | Boolean | [key, read] | Indicates when to enable servicing. - True if servicing is enabled in the current session - False if servicing will be enabled in the session that follows a restart. |
ServiceEnabled | Boolean | [read] | Indicates if the system is in servicing mode in the current session, or will be in servicing mode in the next session that follows a restart. - True if servicing is enabled - otherwise, False. |
This class only has two instances, one for the current session, and another for the next session that follows a restart.
The following example shows how to enable and disable UWF servicing mode on a device by using the Windows Management Instrumentation (WMI) provider in a PowerShell script.
$COMPUTER = "localhost"
$NAMESPACE = "root\standardcimv2\embedded"
# Define common parameters
$CommonParams = @{"namespace"=$NAMESPACE; "computer"=$COMPUTER}
# Enable UWF servicing
$nextSession = Get-WmiObject -class UWF_Servicing @CommonParams | where {
$_.CurrentSession -eq $false
}
if ($nextSession) {
$nextSession.Enable() | Out-Null;
Write-Host "This device is enabled for servicing mode after the next restart."
}
# Disable UWF servicing
$nextSession = Get-WmiObject -class UWF_Servicing @CommonParams | where {
$_.CurrentSession -eq $false
}
if ($nextSession) {
$nextSession.Disable() | Out-Null;
Write-Host "Servicing mode is now disabled for this device."
}
Windows Edition | Supported |
---|---|
Windows Home | No |
Windows Pro | No |
Windows Enterprise | Yes |
Windows Education | Yes |
Windows IoT Enterprise | Yes |