使用powershell的事务?

使用powershell的事务?,powershell,transactions,Powershell,Transactions,我正在尝试执行以下脚本: Start-Transaction Remove-Item D:\sandbox\temp.txt -UseTransaction Undo-Transaction 我不断得到以下错误: The provider does not support transactions. Perform the operation again without the -UseTransaction parameter. At line:3 char:1 + Remove-Item

我正在尝试执行以下脚本:

Start-Transaction
Remove-Item D:\sandbox\temp.txt -UseTransaction
Undo-Transaction
我不断得到以下错误:

The provider does not support transactions. Perform the operation again without the -UseTransaction parameter.
At line:3 char:1
+ Remove-Item D:\sandbox\temp.txt -UseTransaction
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (:) [], PSNotSupportedException
    + FullyQualifiedErrorId : NotSupported

有人知道为什么吗?我正在使用Windows7 Professional x64和Powershell 4。D:\是本地驱动器。

从获取启动事务帮助:

事务中使用的cmdlet必须设计为支持 交易。支持事务的cmdlet具有UseTransation 参数要在提供程序中执行事务,提供程序必须 支持事务。中的Windows PowerShell注册表提供程序 Windows Vista和更高版本的Windows支持事务。你 也可以使用 Microsoft.PowerShell.Commands.Management.TransactiveString类,用于 在任何版本的Windows上的事务中包含表达式 支持Windows PowerShell。其他Windows PowerShell提供程序可以 还支持事务

重点补充


我认为文件系统提供程序不支持事务。

从获取启动事务帮助:

事务中使用的cmdlet必须设计为支持 交易。支持事务的cmdlet具有UseTransation 参数要在提供程序中执行事务,提供程序必须 支持事务。中的Windows PowerShell注册表提供程序 Windows Vista和更高版本的Windows支持事务。你 也可以使用 Microsoft.PowerShell.Commands.Management.TransactiveString类,用于 在任何版本的Windows上的事务中包含表达式 支持Windows PowerShell。其他Windows PowerShell提供程序可以 还支持事务

重点补充


我不相信文件系统提供程序支持事务。

根据Remove-Item支持事务。Remove-Item与支持事务的提供程序一起使用时支持事务。例如,您应该能够使用remove item作为与注册表提供程序的事务。感谢您的澄清。我知道Vista+在操作系统中添加了基于文件的事务,我只是错误地认为微软自己的cmdlet将支持该功能。多幸运啊。根据Remove-Item支持事务。Remove-Item与支持事务的提供程序一起使用时支持事务。例如,您应该能够使用remove item作为与注册表提供程序的事务。感谢您的澄清。我知道Vista+在操作系统中添加了基于文件的事务,我只是错误地认为微软自己的cmdlet将支持该功能。多幸运啊。他们会有用的。