Stops executing script session.
Stop-ScriptSession -Id <String>
Stop-ScriptSession -Session <ScriptSession>
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
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.
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.
The input type is the type of the objects that you can pipe to the cmdlet.
- System.String or Spe.Core.Host.ScriptSession
The output type is the type of the objects that the cmdlet emits.
Help Author: Adam Najmanowicz, Michael West
The following stops the script session with the specified Id.
PS master:\> Stop-ScriptSession -Id "My Background Script Session"