I created a system restore point. I want to restore it. The restore point description is 'rajiv' and the sequence number is 1.

get-computerrestorepoint | where description -eq 'rajiv' | Select-Object -ExpandPropert
y SequenceNumber | Restore-Computer -RestorePoint

I can also get it working by:

Restore-Computer -RestorePoint (get-computerrestorepoint | where description -eq 'rajiv' | Select-Object -ExpandProperty SequenceNumber)

For another approach, In powershell we can use the before and after switch to grab the output of the previous or next pipeline. How to do this? Please help and guide with some documentation.

1 Answers

0
js2010 On Best Solutions

restore-computer doesn't take pipeline input, so you have to use foreach-object, as I replied on technet.