Get-Computerrestorepoint Properties RRS feed

  • Question

  • Hey Scripting Guys !

    Question about properties and passing variables to / from Get-ComputerRestorePoint to Restore-computer CMDLT

    basically I need this function to work...  

    $restorepoint = Get-ComputerRestorePoint(.sequencenumber) | Where-Object {$_.Description -eq "IE11INSTALL"}

    echo $restorepoint

    Restore-Computer -RestorePoint $restorepoint

    I was hoping that the $restorepoint variable would return the sequence #, but it returns all the contents of the get-computerRestorepoint  

    Is there a way I can get it to return ONLY the Sequence that Is associated with the particular restore point called "IE11INSTALL" 

    This way I can use the variable it returns on the -Restorepoint pass thru

    thanks !


    • Moved by Bill_Stewart Tuesday, November 7, 2017 10:53 PM This is not "teach me PowerShell basics" forum
    Wednesday, October 4, 2017 1:53 PM

All replies

  • or a better solution might be that...  when I create a system restore point... can I give it a specific sequence # 

    So... thinking...  Checkpoint-computer -sequence 9999  ??



    Wednesday, October 4, 2017 2:04 PM
  • Restore-Computer -RestorePoint $restorepoint.SequenceNumber

    Before wasting time guessing try learning PowerShell.

    Learn PowerShell: https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276


    • Edited by jrv Wednesday, October 4, 2017 2:11 PM
    Wednesday, October 4, 2017 2:08 PM
  • Thanks for not helping.. 

    I understand I need to learn powershell more...  But need some help on this...

    Wednesday, October 4, 2017 6:18 PM
  • I gave you the answer. What more do you expect?


    Wednesday, October 4, 2017 7:36 PM