Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MessagesToOutput crashes Transcripts #3860

Closed
Grzy7316 opened this issue Jul 30, 2018 · 3 comments
Closed

MessagesToOutput crashes Transcripts #3860

Grzy7316 opened this issue Jul 30, 2018 · 3 comments
Assignees

Comments

@Grzy7316
Copy link

Steps to Reproduce

Run any Sql Command using InvokeDbaSqlQuery with the -MessagesToOutput switch


Invoke-DbaSqlQuery -SqlInstance $SqlServer -Database $Database -Query $QueryString -Credential $AccessCredential -MessagesToOutput


##  Expected Behavior

Powershell Transcript Continues running

## Actual Behavior


The Error 

Stop-Transcript : An error occurred stopping transcription: The host is not currently transcribing.


## Environmental data


 - PowerShell:
Name                           Value                     
----                           -----                     
PSVersion                      5.1.14393.2363            
PSEdition                      Desktop                   
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}   
BuildVersion                   10.0.14393.2363           
CLRVersion                     4.0.30319.42000           
WSManStackVersion              3.0                       
PSRemotingProtocolVersion      2.3                       
SerializationVersion           1.1.0.1                   
 - - SQL Server: <!-- SELECT @@VERSION output -->
Microsoft SQL Server 2012 (SP3-CU10-GDR) (KB4057121) - 11.0.6615.2 (X64) 
	Jan  9 2018 21:26:48 
	Copyright (c) Microsoft Corporation
	Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
@niphlod
Copy link
Contributor

niphlod commented Jul 30, 2018

hum. what about -Verbose ?

@niphlod niphlod self-assigned this Oct 17, 2018
@niphlod
Copy link
Contributor

niphlod commented Oct 25, 2018

note to self. Remember #2722

@potatoqualitee
Copy link
Member

So I thought that runspaces killed transcriptions, and they do, but only if the runspace is incomplete

Check out http://stevegilham.blogspot.com/2017/02/powershell-transcript-cmdlets-and.html

I'm not so sure about importing the module but it seems this singular command would be possible to fix /cc @shaneis

potatoqualitee added a commit that referenced this issue Nov 10, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants