Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Create method creates a new instance of the Win32_DFSNode class. This instance can represent the root of a new Distributed file system (DFS) structure or a connection to one or more shared folders or targets.
This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.
Syntax
uint32 Create(
[in] string DFSEntryPath,
[in] string ServerName,
[in] string Sharename,
[in, optional] string Description
);
Parameters
-
DFSEntryPath [in]
-
Path of the DFS root.
-
ServerName [in]
-
Name of the server that hosts the share to which the node is associated. For example, to create a link associated to a share \"\\\\myserver\myshare\", the parameter should be set to \"\\\\myserver\".
-
Sharename [in]
-
Name of the share to which the node is associated. For example, to create a link associated to a share \"\\\\myserver\myshare\", the parameter should be set to \"myshare\".
-
Description [in, optional]
-
A comment that describes the node.
Return value
Returns a value of 0 (zero) if the service was successfully modified, 1 (one) if the request is not supported, and any other number to indicate an error. For more information about returned error codes, see WMI Error Constants for C++ or WbemErrorEnum for scripting error codes.
-
Success (0)
-
Other (1 4294967295)
Requirements
| Minimum supported client |
Windows Vista |
| Minimum supported server |
Windows Server 2008 |
| Namespace |
Root\CIMv2 |
| MOF |
|
| DLL |
|