Directory Services

IADsComputerOperations::Shutdown

The IADsComputerOperations::Shutdown method causes a computer under ADSI control to execute the shutdown operation with an optional reboot.

HRESULT Shutdown( 
  boolean bReboot
);

Parameters

bReboot
[in] If TRUE, then reboot the computer after the shutdown is complete.

Return Values

This method supports the standard return values, as well as the following:

For other return values, see ADSI Error Codes.

Return Code Description
S_OK The shutdown command has been issued successfully.
E_FAIL The request is denied.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.

See Also

IADsComputer, IADsComputerOperations