📄 net.html
字号:
<code>NetGroupEnum()</code>, this function does not allow you to specify a level
(internally it is hardcoded to 0). In Perl it is trivial to implement
the equivalent function (should you need it).</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The server on which to enumerate the (global) <code>groups</code>.</p>
</dd>
</li>
<dt><strong><code>array</code> - Array Reference</strong>
<dd>
<p>An array that, on return, will contain the <code>group</code> names.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="groupgetinfo_server__group__level__hash_">GroupGetInfo(server, group, level, hash)</a></h2>
<p>Retrieves <code>level</code> information for <code>group</code> returning information in
<code>hash</code>.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> from which to get the group information.</p>
</dd>
</li>
<dt><strong><code>group</code> - Scalar String</strong>
<dd>
<p>The <code>group</code> whose information you wish to obtain.</p>
</dd>
</li>
<dt><strong><code>level</code> - Scalar Int</strong>
<dd>
<p>The <code>level</code> of information you wish to retrieve. This can be one of 1, 2
or 3. See <a href="#group_info_levels">GROUP INFO LEVELS</a>.</p>
</dd>
</li>
<dt><strong><code>hash</code> - Hash Reference</strong>
<dd>
<p>The hash that will contain the information.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="groupgetusers_server__group__array_">GroupGetUsers(server, group, array)</a></h2>
<p>Returns (in <code>array</code>) the users belonging to <code>group</code>. Unlike the API
call <code>NetGroupGetUsers()</code>, this function does not allow you to specify
a level (internally it is hardcoded to 0). In Perl it is trivial to
implement the equivalent function (should you need it).</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> from which to get the group information.</p>
</dd>
</li>
<dt><strong><code>group</code> - Scalar String</strong>
<dd>
<p>The <code>group</code> whose users you wish to obtain.</p>
</dd>
</li>
<dt><strong><code>array</code> - Array Reference</strong>
<dd>
<p>The array to hold the user names retrieved.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="groupsetinfo_server__group__level__hash__error_">GroupSetInfo(server, group, level, hash, error)</a></h2>
<p>Sets the information for <code>group</code> according to <code>level</code>.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> on which to set the <code>group</code> information.</p>
</dd>
</li>
<dt><strong><code>group</code> - Scalar String</strong>
<dd>
<p>The <code>group</code> whose information you wish to set.</p>
</dd>
</li>
<dt><strong><code>level</code> - Scalar Int</strong>
<dd>
<p>The <code>level</code> of information you are supplying in <code>hash</code>. Level can be
one of 0, 1 or 2. See <a href="#group_info_levels">GROUP INFO LEVELS</a>.</p>
</dd>
</li>
<dt><strong><code>hash</code> - Hash Reference</strong>
<dd>
<p>The hash containing the required key/value pairs for <code>level</code>.</p>
</dd>
</li>
<dt><strong><a name="item_error__2d_scalar_string"><code>error</code> - Scalar String</a></strong>
<dd>
<p>On failure, the <code>error</code> parameter will contain a value which specifies
which field caused the error. See <a href="#group_field_errors">GROUP FIELD ERRORS</a>.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="groupsetusers_server__group__array_">GroupSetUsers(server, group, array)</a></h2>
<p>Sets the membership of <code>group</code> to contain only those users specified
in <code>array</code>. This function will fail if any user names contained in the
array are not valid users on <code>server</code>. On successful completion
<code>group</code> will contain only the users specified in <code>array</code>. Use the
functions <code>GroupAddUser()/GroupDelUser()</code> to add and delete individual
users from a group.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> on which to set the <code>group</code> membership.</p>
</dd>
</li>
<dt><strong><code>group</code> - Scalar String</strong>
<dd>
<p>The <code>group</code> to set the membership of.</p>
</dd>
</li>
<dt><strong><code>array</code> - Array Reference</strong>
<dd>
<p>The array containing the names of all users who will be members of <code>group</code>.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="net_local_group_functions">NET LOCAL GROUP FUNCTIONS</a></h1>
<p>The <code>LocalGroup*()</code> functions operate on local groups. If these
functions are run on a PDC then these functions operate on the domains
local groups.</p>
<p>Administrator or Account Operator group membership is required to
successfully execute most of these functions on a remote server or on a
computer that has local security enabled.</p>
<p>The <code>server</code> field can be the empty string, in which case the function
defaults to running on the local computer. If you leave this field blank
then you should ensure that you are running the function on a PDC or BDC
for your current domain. Use the support function <code>GetDCName()</code> to find
out what the domain controller is, should you not be running this on the PDC.</p>
<p>The following functions are available.</p>
<p>
</p>
<h2><a name="localgroupadd_server__level__hash__error_">LocalGroupAdd(server, level, hash, error)</a></h2>
<p>Adds the specified group. The name of the group is contained in the <code>name</code>
key of <code>hash</code>.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> on which to add the group.</p>
</dd>
</li>
<dt><strong><code>level</code> - Scalar String</strong>
<dd>
<p>The <code>level</code> of information contained in <code>hash</code>. This can be one of 0 or 1.
See <a href="#local_group_info_levels">LOCAL GROUP INFO LEVELS</a>.</p>
</dd>
</li>
<dt><strong><code>hash</code> - Hash Reference</strong>
<dd>
<p>A hash containing the required key/value pairs for <code>level</code>.</p>
</dd>
</li>
<dt><strong><code>error</code> - Scalar Int</strong>
<dd>
<p>Provides information on which field in <code>hash</code> wasn't properly specified.
See <a href="#local_group_field_errors">LOCAL GROUP FIELD ERRORS</a> for more information about what values
this can take.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="localgroupaddmember__"><code>LocalGroupAddMember()</code></a></h2>
<p>This function is obselete in the underlying API and has therefore not
been implemented. Use <code>LocalGroupAddMembers</code> instead.</p>
<p>
</p>
<h2><a name="localgroupaddmembers_server__group__array_">LocalGroupAddMembers(server, group, array)</a></h2>
<p>Adds the specified users (members) to the local group. Unlike the API
function <code>NetLocalGroupAddMembers()</code>, this function does not allow you
to specify a level (internally it is hardcoded to 3).
This was done to simplify the implementation. To add a 'local' user, you
need only specify the <code>name</code>. You can also specify users using the
<code>DOMAIN\user</code> syntax.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> on which to add the members to <code>group</code>.</p>
</dd>
</li>
<dt><strong><code>group</code> - Scalar String</strong>
<dd>
<p>The <code>group</code> to add the members to.</p>
</dd>
</li>
<dt><strong><code>array</code> - Array Reference</strong>
<dd>
<p>The array containing the members to add to <code>group</code>.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="localgroupdel_server__group_">LocalGroupDel(server, group)</a></h2>
<p>Delete the specified local group.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> on which to delete the named <code>group</code>.</p>
</dd>
</li>
<dt><strong><code>group</code> -Scalar String</strong>
<dd>
<p>The <code>group</code> to delete.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="localgroupdelmember__"><code>LocalGroupDelMember()</code></a></h2>
<p>This function is obselete in the underlying API and has therefore not
been implemented. Use <code>LocalGroupDelMembers()</code> instead.</p>
<p>
</p>
<h2><a name="localgroupdelmembers_server__group__array_">LocalGroupDelMembers(server, group, array)</a></h2>
<p>Delete the specified users (members) of the local group. Unlike the API
function <code>NetLocalGroupDelMembers()</code>, this function does not allow you
to specify a level (internally it is hardcoded to 3). This was done to
simplify the implementation. To delete a 'local' user, you need only
specify the <code>name</code>. You can also specify users using the <code>DOMAIN\user</code>
syntax.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> on which to delete the members from <code>group</code>.</p>
</dd>
</li>
<dt><strong><code>group</code> - Scalar String</strong>
<dd>
<p>The <code>group</code> to delete the members from.</p>
</dd>
</li>
<dt><strong><code>array</code> - Array Reference</strong>
<dd>
<p>The array containing the members to delete from <code>group</code>.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="localgroupenum_server__array_">LocalGroupEnum(server, array)</a></h2>
<p>Enumerates all the local groups on the server. Unlike the API call
<code>NetLocalGroupEnum()</code>, this function does not allow you to specify a
level (internally it is hardcoded to 0). In Perl it is trivial to
implement the equivalent function (should you need it).</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The server on which to enumerate the (local) <code>groups</code>.</p>
</dd>
</li>
<dt><strong><code>array</code> - Array Reference</strong>
<dd>
<p>The array to hold the <code>group</code> names.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="localgroupgetinfo_server__group__level__hash_">LocalGroupGetInfo(server, group, level, hash)</a></h2>
<p>Retrieves <code>level</code> information for <code>group</code>.</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> from which to get the group information.</p>
</dd>
</li>
<dt><strong><code>group</code> - Scalar String</strong>
<dd>
<p>The <code>group</code> whose information you wish to obtain.</p>
</dd>
</li>
<dt><strong><code>level</code> - Scalar Int</strong>
<dd>
<p>The <code>level</code> of information you wish to retrieve. This can be 0 or 1.
See <a href="#local_group_info_levels">LOCAL GROUP INFO LEVELS</a>.</p>
</dd>
</li>
<dt><strong><code>hash</code> - Hash Reference</strong>
<dd>
<p>The hash that will contain the information.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="localgroupgetmembers_server__group__hash_">LocalGroupGetMembers(server, group, hash)</a></h2>
<p>Retrieves the users belonging to <code>group</code>. Unlike the API call
<code>NetLocalGroupGetUsers()</code>, this function does not allow you to specify
a level (internally it is hardcoded to 0). In Perl it is trivial to
implement the equivalent function (should you need it).</p>
<dl>
<dt><strong><code>server</code> - Scalar String</strong>
<dd>
<p>The <code>server</code> from which to retrieve the group information.</p>
</dd>
</li>
<dt><strong><code>group</code> - Scalar String</strong>
<dd>
<p>The <code>group</code> whose users you wish to obtain.</p>
</dd>
</li>
<dt><strong><code>array</code> - Array Reference</strong>
<dd>
<p>The array to hold the user names retrieved.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="localgroupsetinfo_server__level__hash__error_">LocalGroupSetInfo(server, level, hash, error)</a></h2>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -