WSManDeinitialize function (wsman.h)

Deinitializes the Windows Remote Management client stack. All operations must be complete before a call to this function will return. This is a synchronous call. It is recommended that all operations are explicitly canceled and that all sessions are closed before calling this function.


DWORD WSManDeinitialize(
  [in, out, optional] WSMAN_API_HANDLE apiHandle,
                      DWORD            flags


[in, out, optional] apiHandle

Specifies the API handle returned by a WSManInitialize call. This parameter cannot be NULL.


Reserved for future use. Must be zero.

Return value

This method returns zero on success. Otherwise, this method returns an error code.


Minimum supported client Windows 7
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header wsman.h
Library WsmSvc.lib
DLL WsmSvc.dll
Redistributable Windows Management Framework on Windows Server 2008 with SP2 and Windows Vista with SP2