GetOwnerSid method of the Win32_Process class

The GetOwnerSid WMI class method retrieves the security identifier (SID) for the owner of this process.

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

Syntax

uint32 GetOwnerSid(
  [out] string Sid
);

Parameters

Sid [out]

Returns the security identifier descriptor for this process.

Return value

Returns zero (0) to indicate success. Any other number indicates an error. For additional error codes, see WMI Error Constants or WbemErrorEnum. For general HRESULT values, see System Error Codes.

Successful completion (0)

Access denied (2)

Insufficient privilege (3)

Unknown failure (8)

Path not found (9)

Invalid parameter (21)

Other (22 4294967295)

Examples

The Find the logged on users on a remote system/s version 2 PowerShell code example queries remote machines to see who is logged on.

Requirements

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

See also

Operating System Classes

Win32_Process