Edit

Share via


Stop-Transcript

Stops a transcript.

Syntax

Default (Default)

Stop-Transcript
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Stop-Transcript cmdlet stops a transcript that was started by the Start-Transcript cmdlet. Alternatively, you can end a session to stop a transcript.

Examples

Example 1: Stop all transcripts

Stop-Transcript

This command stops all transcripts.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

This parameter was added in PowerShell 7.4.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet isn't run.

This parameter was added in PowerShell 7.4.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

You can't pipe objects to this cmdlet.

Outputs

String

This cmdlet returns a string that contains a status message and the path to the output file.

Notes

If a transcript hasn't been started, the command fails.