Gets the name of the current user. Namespace: Microsoft.ConfigurationManagement.AdminConsole
Assembly: Microsoft.ConfigurationManagement.ManagementProvider (in microsoft.configurationmanagement.managementprovider.dll)

Usage

Visual Basic
Dim connectionManager As ConnectionManagerBase
Dim returnValue As String

returnValue = ResultObjectHelpers.CurrentUserName(connectionManager)

Syntax

Visual Basic
Public Shared Function CurrentUserName ( _
		connectionManager As ConnectionManagerBase _
) As String
C#
public static string CurrentUserName (
		ConnectionManagerBase connectionManager
)
C++
public:
static String^ CurrentUserName (
		ConnectionManagerBase^ connectionManager
)
J#
public static String CurrentUserName (
		ConnectionManagerBase connectionManager
)
JScript
public static function CurrentUserName (
		connectionManager : ConnectionManagerBase
) : String

Parameters

connectionManager

[in] ConnectionManagerBase object.

Return Value

Current user name.

Remarks

Exception type

Condition

ArgumentNullException

The connectionManager parameter cannot be null.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2003,Windows Vista

See Also