Share via


Fbwf Class (Standard 7 SP1)

7/8/2014

The Fbwf class is used to get information about File-Based Write Filter configurations for both the current session and the next session, and to change general settings.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

class Fbwf
{
  boolean Enabled;
  boolean NextEnabled;
};

Members

The Fbwf class defines the following types of members:

  • Methods
  • Properties

Methods

The Fbwf class defines the following methods.

Methods

Description

AddExclusion Method

Adds a file or directory to the file exclusion list.

CommitFile Method

Writes the cached file to the physical disk file.

ProtectVolume Method

Enables write protection for a specific volume.

RemoveExclusion Method

Removes a file or directory from the exclusion list.

RestoreFile Method

Resets the cached view of the specified file.

UnprotectVolume Method

Removes write protection for a specific volume and optionally removes the exclusion list.

Properties

The Fbwf class defines the following properties.

  • Enabled

    • Data type: boolean

      Access type: Read-only

      Returns true if the File-Based Write Filter is active in the current session.

  • NextEnabled

    • Data type: boolean

      Access type: Read/write

      Specifies whether the File-Based Write Filter is active in the next session.

Example

This example can be used to retrieve the FBWF configuration.

Windows PowerShell

$ComputerName="localhost"   # or "remote-machine-name"
$Namespace = "root\Microsoft\WriteFilters"
$Class = "Fbwf"

Write-Host "Retrieving Fbwf configuration..."

$Fbwf = Get-WmiObject `
   -ComputerName $ComputerName `
   -Namespace $Namespace `
   -Class $Class 
Write-Output $Fbwf | Format-List

VBScript

strComputer = "localhost"   ' or "remote-machine-name"
strNamespace = "\root\Microsoft\WriteFilters"
strClass = "Fbwf=@"

WScript.Echo "Retrieving Fbwf configuration..."

On Error Resume Next

Set Fbwf = GetObject("WINMGMTS:\\" & strComputer & strNamespace & ":" & strClass)

If Err.Number <> 0 Then
   WScript.Echo "Method exited with error code: 0x" & Hex(Err.Number)
   Wscript.Echo Err.Source & " - " & Err.Description
   WScript.Quit(1)
End If

For Each Prop In Fbwf.Properties_
   WScript.Echo Prop.Name & ":" & Prop.Value
Next

Requirements

Supported clients

Windows XP Embedded SP3
Windows Embedded Standard 2009
Windows Embedded Standard 7 SP1
WEPOS 1.1 SP3
POSReady 2009
Windows Embedded POSReady 7
Windows Fundamentals for Legacy PCs 7

MOF

FBWFProvider.mof

Namespace

\root\Microsoft\WriteFilters