Stop-ScriptSession
Stops executing script session.
Syntax
Stop-ScriptSession -Id <String[]>
Stop-ScriptSession -Session <ScriptSession[]>
Detailed Description
Aborts the pipeline of a session that is executing. This will stop the session immediately in its next PowerShell command. Caution! If your script is running a long operation in the .net code rather than in PowerShell - the session will abort after the code has finished and the control was returned to the script.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Parameters
-Id <String[]>
Stops the script session with the specified IDs. The ID is a string that uniquely identifies the script session within the server. You can type one or more IDs (separated by commas). To find the ID of a script session, type "Get-ScriptSession" without parameters.
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
true (ByValue)
Accept Wildcard Characters?
false
-Session <ScriptSession[]>
Specifies the script session to be stopped. Enter a variable that contains the script session or a command that gets the script session. You can also pipe a script session object to Receive-ScriptSession.
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
true (ByValue)
Accept Wildcard Characters?
false
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
System.String or Spe.Core.Host.ScriptSession
Outputs
The output type is the type of the objects that the cmdlet emits.
Spe.Core.Host.ScriptSession
Notes
Help Author: Adam Najmanowicz, Michael West
Examples
EXAMPLE
Related Topics
Last updated