Export (0) Print
Expand All

Rename method of the Win32_UserAccount class

The RenameWMI class method renames a user account name.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.

Syntax


unit32 Rename(
  string Name
);

Parameters

Name

New account name.

Return value

Return codeDescription
0

Success.

1

Instance not found.

2

Instance required.

3

Invalid parameter.

4

User not found.

5

Domain not found.

6

Operation is allowed only on the primary domain controller of the domain.

7

Operation is not allowed on the last administrative account.

8

Operation is not allowed on specified special groups: user, admin, local, or guest.

9

Other API error.

10

Internal error.

 

Remarks

This functionality is implemented as a method to provide a separate context for the new name that is distinguishable from the key property value for Name that is associated with the instance to be modified.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2

MOF

CIMWin32.mof

DLL

CIMWin32.dll

See also

Win32_UserAccount
Operating System Classes

 

 

Show:
© 2014 Microsoft