Skip to content

Latest commit

 

History

History
115 lines (68 loc) · 2.18 KB

session-delete.md

File metadata and controls

115 lines (68 loc) · 2.18 KB
title description ms.assetid ms.tgt_platform keywords topic_type api_name api_location api_type ms.topic ms.date
Session.Delete method (WSManDisp.h)
Deletes the resource specified in the resource URI.
8803d35d-674c-483d-866b-37129102c7ce
multiple
Delete method Windows Remote Management
Delete method Windows Remote Management , Session object
Session object Windows Remote Management , Delete method
apiref
Session.Delete
WSMAuto.dll
COM
reference
05/31/2018

Session.Delete method

Deletes the resource specified in the resource URI.

Syntax

Session.Delete( _
  ByVal resourceUri, _
  [ ByVal flags ] _
)

Parameters

resourceUri [in]

The URI of the resource to be deleted. You can also use a ResourceLocator object to specify the resource.

flags [in, optional]

Reserved for future use. Must be set to 0.

Return value

This method does not return a value.

Remarks

The following syntax is used to call this method.

session.Delete("<resourceUri>")

Examples

The following VBScript code example deletes the listeners configured for HTTP transport.

Set objWsman = CreateObject( "WSMan.Automation" )
Set objSession = objWsman.CreateSession
strResource = "http://schemas.microsoft.com/wbem/wsman/1/" &_
  "config/Listener?Address=*+Transport=HTTP"
objSession.Delete(strResource)

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
WSManDisp.h
IDL
WSManDisp.idl
Library
WSManDisp.tlb
DLL
WSMAuto.dll

See also

Session