By accidently or unknowing if wrong commands happens or it causes major impact if any option to restore to back? Second question how to use breakpoints or check points in PowerShell script to avoid unwanted events
Hi Jumpav,
no, there usually is no rollback option. A good function/cmdlet will ask you, whether you really want to do such a major change.
Good help texts for the second question:
Get-Help about_if
Get-Help about_Try_Catch_Finally
Cheers,
Fred
Note: Transactions are not supported by all cmdlet's - So, please read and use as required.
Adding to Fred, it's worth to read about_transactions
Introduction to Transactions
https://technet.microsoft.com/en-us/library/ff730971.aspx
Undo-Transactions
https://technet.microsoft.com/en-us/library/hh849806.aspx
https://technet.microsoft.com/en-us/library/hh847861.aspx
- Proposed as answer by AnnaWYMicrosoft contingent staff, Moderator 2 hours 6 minutes ago
- Proposed as answer by AnnaWYMicrosoft contingent staff, Moderator Wednesday, July 15, 2015 5:02 AM