I recently discovered the *-Transaction
cmdlets are missing. I compared all the cmdlets shipped with PS in 5.1 and in PS 7 RC2 to see if there were any differences. The following report of all the differences that were not explicitly noted in PS 6 Breaking Changes
| Cmdlet | Module | Related Issue | Notes|
| -------- | -------- | ---------------| ---------|
| ConvertFrom-String | Microsoft.PowerShell.Utility | #726 | |
| Convert-String | Microsoft.PowerShell.Utility | #726 | |
| Get-ControlPanelItem | Microsoft.PowerShell.Management | |
| Show-ControlPanelItem | Microsoft.PowerShell.Management | |
| Disable-ComputerRestore | Microsoft.PowerShell.Management | | Is it included in *-Computer
? section in: PS 6 Breaking Changes
| Enable-ComputerRestore | Microsoft.PowerShell.Management | | Is it included in *-Computer
? section in: PS 6 Breaking Changes
| Get-ComputerRestorePoint | Microsoft.PowerShell.Management | | Is it included in *-Computer
? section in: PS 6 Breaking Changes
| Reset-ComputerMachinePassword | Microsoft.PowerShell.Management | | Is it included in *-Computer
? section in: PS 6 Breaking Changes
| Test-ComputerSecureChannel | Microsoft.PowerShell.Management | #11706 | Is it included in *-Computer
? section in: PS 6 Breaking Changes
| Complete-Transaction | Microsoft.PowerShell.Management | #11724 |
| Get-Transaction | Microsoft.PowerShell.Management | #11724 |
| Start-Transaction | Microsoft.PowerShell.Management | #11724 |
| Undo-Transaction | Microsoft.PowerShell.Management | #11724 |
| Use-Transaction | Microsoft.PowerShell.Management | #11724 |
/cc @sdwheeler for information.
It would be nice for PowerShell 7 users to be able to use those directly. Is there any chance for some of those to be returned into PowerShell 7?
And by now I hope that PowerShell 7.0 is feature complete - so except for making the error messages more actionable when using these commands, I'd not want more to go into PowerShell 7.0. For example:
PS C:\foo> enable-computerrestore
enable-computerrestore: The term 'enable-computerrestore' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Suggestion [4,General]: The most similar commands are: Enable-ComputerRestore, Disable-ComputerRestore.
or
PS C:\foo> start-transaction
start-transaction: The term 'start-transaction' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Suggestion [1,Transactions]: Once a transaction is started, only commands that get called with the -UseTransaction flag become part of that transaction.
Suggestion [4,General]: The most similar commands are: Start-Transaction, Start-Transcript, Get-Transaction, Set-DtcTransaction, Use-Transaction, Undo-Transaction, Get-DtcTransaction.
Saying a command is not recognised then suggersting you use that very same command is really a poor experience. IMHO this really needs to be addressed before 7.0 RTM.
@SteveL-MSFT / @joeyaiello can either of you two determine if these cmdlets will make their return into PS 7 for compatibility?
It looks like at the time we started on PSCore6, System.Transactions
wasn't available, so those cmdlets were removed. It appears that namespace is back in 3.1, so we could bring them back in 7.1. For the ComputerRestore cmdlets, it seems that the original code was using WMI APIs which wasn't supported in CoreCLR until 3.0, we could bring those back as well in 7.1.
@SteveL-MSFT The missing docs issues have been addressed. Probably can close this issue but need feature request for re-implementing older cmdlets.
@SteveL-MSFT will the transaction cmdlets be making their return with 7.1?
I could be wrong but IIRC the transaction cmdlets were closely related to the workflow features, which are not coming back. 馃
MSFT docs do not recommend to use NTFS transaction API.
If I'm not mistaken Transactions can be implemented by any PSProvider. For example, on PS 5.1 the registry provider supports transactions.
The registry provider was the only WIndows PowerShell provider I am aware of that ever supported transactions. Only the registry did, and even that does not appear to be that heavily use. @vexx32 - the transaction commands were used to tart and then either finalise or rollback a transaction. But as I say, only the registry provider ever did it.
Most helpful comment
It looks like at the time we started on PSCore6,
System.Transactions
wasn't available, so those cmdlets were removed. It appears that namespace is back in 3.1, so we could bring them back in 7.1. For the ComputerRestore cmdlets, it seems that the original code was using WMI APIs which wasn't supported in CoreCLR until 3.0, we could bring those back as well in 7.1.