Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Closes a session object.
DWORD WSManCloseSession(
[in, out, optional] WSMAN_SESSION_HANDLE session,
DWORD flags
);
[in, out, optional] session
Specifies the session handle to close. This handle is returned by a WSManCreateSession call. This parameter cannot be NULL.
flags
Reserved for future use. Must be zero.
This method returns zero on success. Otherwise, this method returns an error code.
The WSManCloseSession method frees the memory associated with a session and closes all related operations before returning. This is a synchronous call. All operations are explicitly canceled. It is recommended that all pending operations are either completed or explicitly canceled before calling this function.
Requirement | Value |
---|---|
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 |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today