Export (0) Print
Expand All

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Redistributable

WinRM 1.1 (Windows Server 2003 R2, or Windows Server 2003 with SP1)

Header

Wsmandisp.h

IDL

Wsmandisp.idl

Library

WSManAutomation.lib

DLL

Wsmauto.dll

See also

Session

 

 

Show:
© 2014 Microsoft