UWF_Servicing

このクラスには、統合書き込みフィルター (UWF) サービス モードのクエリと制御を可能にするプロパティとメソッドが含まれています。

構文

class UWF_Servicing {
    [key, read] boolean CurrentSession;
    [read] boolean ServicingEnabled;

    UInt32 Enable();
    UInt32 Disable();
    UInt32 UpdateWindows(
        [out] UInt32 UpdateStatus
    );
};

メンバー

次の表では、このクラスに属するメソッドとプロパティを一覧で示します。

メソッド

Method 説明
UWF_Servicing.Disable Unified Write Filter (UWF) サービス モードを無効にします。
システムは、再起動後の次のセッションでサービス モードを停止します。
UWF_Servicing.Enable Unified Write Filter (UWF) サービス モードを有効にします。
システムは、再起動後の次のセッションでサービス モードになります。
UWF_Servicing.UpdateWindows Windows Update を呼び出し、Windows 10 Enterprise が実行されているデバイスの緊急更新プログラムとセキュリティ更新プログラムをダウンロードしてインストールします。

プロパティ

プロパティ データ型 修飾子 説明 &
CurrentSession Boolean [key、read] サービスをいつ有効にするかを示します。
- True の場合、サービスは現在のセッションで有効になります
- False の場合、サービスは再起動後のセッションで有効になります。
ServiceEnabled Boolean [read] システムが、現在のセッションでサービス モードになっているか、再起動後の次のセッションでサービス モードになるかを示します。
- サービスが有効になっている場合は True
- それ以外の場合は False

解説

このクラスには、インスタンスが 2 つだけみあります。1 つは現在のセッションでのインスタンス、もう 1 つは再起動後の次のセッションでのインスタンスです。

次の例では、PowerShell スクリプトで Windows Management Instrumentation (WMI) プロバイダーを使用して、デバイスの UWF サービス モードを有効または無効にする方法について説明します。

$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 エディション サポートされています
Windows Home いいえ
Windows Pro いいえ
Windows Enterprise はい
Windows Education はい
Windows IoT Enterprise