Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Use-Transaction

Use-Transaction - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Use-Transaction

Short description
Adds the script block to the active transaction.

Syntax
Use-Transaction [-TransactedScript] <ScriptBlock> [-UseTransaction [<SwitchParameter>]] [<CommonParameters>]





Description
The Use-Transaction cmdlet adds a script block to an active transaction. This enables you to do transacted scripting us
ing transaction-enabled Microsoft .NET Framework objects. The script block can contain only transaction-enabled .NET Fr
amework objects, such as instances of the Microsoft.PowerShell.Commands.Management.TransactedString class.


The UseTransaction parameter, which is optional for most cmdlets, is required when using this cmdlet.


The Use-Transaction cmdlet is one of a set of cmdlets that support the transactions feature in Windows PowerShell. For 
more information, see about_Transactions.