共用方式為


Win32_DFSNodeTarget class

The Win32_DFSNodeTarget association WMI class relates a Distributed file system (DFS) node to one of its targets.

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

[dynamic, Provider("DFSProvider"), AMENDMENT]
class Win32_DFSNodeTarget : CIM_Dependency
{
  Win32_DFSTarget REF Antecedent;
  Win32_DFSNode   REF Dependent;
};

Members

The Win32_DFSNodeTarget class has these types of members:

Properties

The Win32_DFSNodeTarget class has these properties.

Antecedent

Data type: Win32_DFSTarget

Access type: Read-only

Qualifiers: Key, Override ("Antecedent"), Min (1)

Reference to the instance representing a target for a DFS node. Each node has one or more targets. This property overrides the Antecedent property inherited from CIM_Dependency.

Dependent

Data type: Win32_DFSNode

Access type: Read-only

Qualifiers: Override ("Dependent"), Key

Reference to an instance representing a DFS node. This property overrides the Dependent property inherited from CIM_Dependency.

Remarks

The Win32_DFSNodeTarget class is derived from CIM_Dependency.

Examples

While Impersonation works with a DFS root server, Delegation is required for all other DC's in a domain-based DFS. The following PowerShell describes how to set delegation.

Get-WmiObject Win32_DFSTarget -computer <dns-domain-name> -impersonation delegate

The following PowerShell code sample shows how to retrieve inaccessable DFS targets

#To retrieve inaccessible DFS targets:

$failed = gwmi Win32_DfsTarget -comp server | where { !(test-path "\\$($_.ServerName)\$($_.ShareName)") }

#To display info: 

$failed | ft LinkName, ServerName, ShareName

#To remove and display the failures:

$failed | where{ $_.Delete().ReturnValue } | ft LinkName, ServerName, ShareName

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\CIMV2
MOF
Wmipdfs.mof
DLL
Wmipdfs.dll

See also

CIM_Dependency

Operating System Classes