v3 suggestion: PowerShell FileSystemProvider should support transactions (TxF)
Votes from Connect: 56
Original Date Submitted: 1/13/2011 12:03:33 AM
Description:
Contact Information
Handle: Oisin Grehan
Site Name: PowerShell
Feedback ID: 635713
Frequency: Always Happens
Regression: Yes, this happens in all previous versions
Problem Description:
From Vista onwards, Windows supports both a transacted registry (TxR) and transacted filesystem (TxF). With powershell v2, we got TxR support. For v3 or beyond, it would be great to have TxF support. A good example taking Pscx's archive cmdlets into account would be the following pipeline:
PS> dir c:\logs\ -rec -inc *.log -usetx | write-zip -removeoriginal -usetx | move-item c:\archived_logs\ -usetx
This will recursively search C:\logs for *.log files, compress them with maximum compression, move them to c:\archived_logs and then delete the original. Transaction support ensures that a failed zip operation (or some other unknown/expected failure) will not result in one of the source files being removed with a corresponding zip backup.
Yes, it's possible to write careful code that will verify written zips etc but even that code may fail in certain circumstances. Tx support keeps it clean and reliable.
Product Studio item created by Connect Synchronizer due to creation of feedback ID 635713 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=635713).
Repro Steps:
n/a
Expected Results:
n/a
Internal BugId: 2784
