Public/Stop-ssTranscript.ps1

function Stop-ssTranscript {
    <#
    .SYNOPSIS
    Stops the enterprise transcript safely.
 
    .DESCRIPTION
    Stops the transcript started by Start-ssTranscript.
    Logs a completion message with timestamp.
 
    .EXAMPLE
    Stop-ssTranscript
 
    .NOTES
    Author: owen.heaume
    Version: 1.0 - Initial release
    #>


    try {
        Write-Host "[$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')] Stopping transcript..." -ForegroundColor Cyan
        Stop-Transcript
    } catch {
        Write-Warning "[!] Failed to stop transcript: $($_.Exception.Message)"
    }
}