CmdID / PowerShell / Cmdlets / Complete
Complete-Transaction
Commits the active transaction. PowerShell reference
From the PowerShell reference 2 parameters
What it does
Commits the active transaction. The Complete-Transaction cmdlet commits an active transaction. When you commit a transaction, the commands in the transaction are finalized and the data affected by the commands is changed. If the transaction includes multiple subscribers, to commit the transaction, you must enter one Complete-Transaction command for every Start-Transaction command. The Complete-Transaction cmdlet is one of a set of cmdlets that support the transactions feature in Windows PowerShell. For more information, see about_Transactions.
Complete-Transaction [-WhatIf] [-Confirm] [<CommonParameters>]
Commit a transaction
Set-Location HKCU:\software
Start-Transaction
New-Item MyCompany -UseTransaction
Get-ChildItem m*IdentifyCommit a transaction that has more than one subscriber
Set-Location HKCU:\software
Start-Transaction
New-Item MyCompany -UseTransactionIdentifyPerform a transaction that does not change any data
Set-Location HKCU:\software
Start-Transaction
New-Item MyCompany -UseTransaction
Get-ChildItem m*IdentifyIts page in the reference: Complete-Transaction.
Parameters
-ConfirmPrompts you for confirmation before running the cmdlet.-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.