DTC: Read & Change Trace Output & Trace Transactions

Welcome Forums General PowerShell Q&A DTC: Read & Change Trace Output & Trace Transactions

This topic contains 8 replies, has 2 voices, and was last updated by

 
Participant
1 month, 1 week ago.

  • Author
    Posts
  • #121818

    Participant
    Points: 6
    Rank: Member

    Hello Everyone

    I have a big Problem, i built a Report to collect all properties for the DTCs on a Server 2016. But i cant find 2 settings nowhere..  I want to read & change the following Values from the Distributed Transaction Coordinator(DTC) with Powershell:

    • Index-Tab: Tracing –> Trace Output
    • Index-Tab: Tracing –> Trace Transaction

    Here's also a picture i found at Google, it's the 2 Values on the Top:

    I found the Function (Get)Set-DtcTransactionsTraceSetting, but with this Function i can only change these 3 Values:

    • AbortedTransactionsTracingEnabled (Trace Aborted Transactions)
    • AllTransactionsTracingEnabled (Trace all Transactions)
    • LongLivedTransactionsTracingEnabled (Trace Long-Lived Transactions)

    I also checked Set-DtcAdvancedSetting there is also no option for these two Values. Also the other Get-Set-Dtc*-Cmdlets didnt help..

    Also usually these Values should be saved in the registry under

    – HKLM\SOFTWARE\Microsoft\MSDTC\Tracing\Output or

    – HKLM\SOFTWARE\Microsoft\MSDTC\Tracing\Sources .. But the "Tracing"-Folders are totally empty..

    I already searched for a many hours on the Internet, but i cant find anything helpfull.

    Any Ideas?

  • #121839

    Participant
    Points: 889
    Helping Hand
    Rank: Major Contributor

    Never tried DTC cmdlets, but wouldn't disabling theses three available properties have the same effect, as those are the only options under the first and the next setting.

  • #121842

    Participant
    Points: 6
    Rank: Member

    I already tried this, but it has no effect on these 3 settings.. that was one of my first thoughts.. bud sadly no. im really desperate on this. I have no idea where to find search, googled so much already! I even looked at the second page of the google results, which i normally never have to do! but still nothing..

  • #121855

    Participant
    Points: 889
    Helping Hand
    Rank: Major Contributor
  • #121888

    Participant
    Points: 6
    Rank: Member

    Im at the beginning of my Powershell-Career.. I never used Get-WMIObject, but i will learn it now..

    You sent me this link.. Shoudlnt it be possible to get this list from the link also with the following command?

    • Get-WMIObject -List *dtc*

    Because i dont get any of the suggestions from your link.. When i look at the list from your link, it almost the same as i get from the command:

    • help *dtc*
  • #121930

    Participant
    Points: 889
    Helping Hand
    Rank: Major Contributor

    You can use CIM cmdlets to access this WMI namespace(Root\MsDTC).

    Get-CimClass -Namespace Root\MsDTC
    

    I donno in which class this setting will be available. So you can take possible classes to dig inn.

    eg:-

    Get-CimInstance -Namespace Root\MsDTC -ClassName DtcTransactionInfo 
    
  • #122109

    Participant
    Points: 6
    Rank: Member

    Hi kvprasoon

    Thanks a lot for your support!

    I started to try with Get-CimClass, but there is a problem. I started with a test with the class DtcTransactionsTraceSettings. Like this:

    $test = Get-CimClass -ClassName DtcTransactionsTraceSettings -Namespace Root\MsDTC | select -ExpandProperty CimClassProperties

    This gives me the 3 Values:

    • AbortedTransactionsTracingEnabled
    • AllTransactionsTracingEnabled
    • LongLivedTransactionsTracingEnabled

    But the Values of these 3 CimProperties are empty.. They should contain true/false Values. Why are these Values empty? When i try with

    $Tracing = Get-DtcTransactionsTraceSetting

    There are Values inside the 3 Properties..

    Best regards

  • #122129

    Participant
    Points: 889
    Helping Hand
    Rank: Major Contributor

    You will have to use Get-CimInstance, Get-CimClass gives the details about that particular class.

  • #122418

    Participant
    Points: 6
    Rank: Member

    Hei kvprasoon

    I'm trying with Get-CimInstance, but still it gives me no Values back.

    First i get the possible Properties with this command:

    $class1 = Get-CimClass -Namespace Root\MsDTC -ClassName DtcTransactionInfo | Select -ExpandProperty CimClassProperties

    Then i tried to get the Value like you said with Get-CimInstance like this:

    $test1 = Get-CimInstance -Namespace Root\MsDTC -ClassName DtcTransactionInfo -Property "Description"

    But test1 is still empty. There is no Value. To be sure i tried also with the following 2 commands:

    $class2 = Get-CimClass -Namespace Root\MsDTC -ClassName DtcTransactionsTraceSettings | select -ExpandProperty CimClassProperties
    
    $test2 = Get-CimInstance -Namespace Root\MsDTC -ClassName DtcTransactionsTraceSettings -Property "AbortedTransactionsTracingEnabled"

    Any Idea what im doing wrong??

    Thanks for your help, im quiet stuck at this point 🙁

You must be logged in to reply to this topic.