restore to back

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

July 14th, 2015 1:42am

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

Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 3:09am

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

About_Transactions

https://technet.microsoft.com/en-us/library/hh847861.aspx

July 14th, 2015 3:41am

Many cmdlets support the -whatif switch which can prevent accidents. http://blogs.technet.com/b/heyscriptingguy/archive/2011/11/21/make-a-simple-change-to-powershell-to-prevent-accidents.aspx
Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 3:53am

Many cmdlets support the -whatif switch which can prevent accidents. http://blogs.technet.com/b/heyscriptingguy/archive/2011/11/21/make-a-simple-change-to-powershell-to-prevent-accidents.aspx
July 14th, 2015 7:51am

Nice, that one is new for me, thank you!
Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 8:12am

15 threads in one day?
July 14th, 2015 8:20am

15 threads i
Free Windows Admin Tool Kit Click here and download it now
July 14th, 2015 8:28am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics