Win32_DFSTarget class
Applies to: desktop apps only
The Win32_DFSTarget WMI class represents a target of a Distributed file system (DFS) node.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties are listed in alphabetic order, not MOF order.
Syntax
class Win32_DFSTarget : CIM_LogicalElement
{
string Caption;
string Description;
datetime InstallDate;
string LinkName;
string Name;
string ServerName;
string ShareName;
uint32 State;
string Status;
};
Members
The Win32_DFSTarget class has these types of members:
Properties
The Win32_DFSTarget class has these properties.
- Caption
-
- Data type: string
- Access type: Read-only
- Qualifiers: MaxLen (64)
Short description of the object. This property is inherited from CIM_ManagedSystemElement.
- Description
-
- Data type: string
- Access type: Read/write
Comment that describes the link. This property is inherited from CIM_ManagedSystemElement.
- InstallDate
-
- Data type: datetime
- Access type: Read-only
Date and time when the object was installed. This property does not need a value to indicate that the object is installed. This property is inherited from CIM_ManagedSystemElement.
- LinkName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Entry path of the node to which this target belongs.
- Name
-
- Data type: string
- Access type: Read-only
Label by which the object is known. When subclassed, the property can be overridden to be a key property. This property is inherited from CIM_ManagedSystemElement.
- ServerName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
Name of the server that the node references.
- ShareName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
String representing the name of the share that the node references.
- State
-
- Data type: uint32
- Access type: Read-only
State of the target.
Value Meaning - 0
Offline
- 2
Online
- 4
Active
- Status
-
- Data type: string
- Access type: Read-only
- Qualifiers: MaxLen (10)
Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states. This property is inherited from CIM_ManagedSystemElement.
The values are:
- "OK"
- "Error"
- "Degraded"
- "Unknown"
- "Pred Fail"
- "Starting"
- "Stopping"
- "Service"
Remarks
The Win32_DFSTarget class is derived from CIM_LogicalElement. You can only use this class on a DFS server. The WMI provider that implements the functionality of this class is installed when you install the file sharing server role.
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
|
Minimum supported client | Windows Vista |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Namespace |
\root\CIMV2 |
|
MOF |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/9/2012
Get-WmiObject Win32_DFSTarget -computer <dns-domain-name> -impersonation delegate
- 2/19/2009
- Radjin Sardjoe Missier
- 9/24/2010
- Radjin Sardjoe Missier
$failed = gwmi Win32_DfsTarget -comp server | where { !(test-path "\\$($_.ServerName)\$($_.ShareName)") }
$failed | ft LinkName, ServerName, ShareName
$failed | where{ $_.Delete().ReturnValue } | ft LinkName, ServerName, ShareName
- 1/17/2010
- Radjin Sardjoe Missier
- 9/24/2010
- Radjin Sardjoe Missier