Compare RRS feed

  • Question

  • I've tried to use the command Compare-Object or IF parameter.

    • Edited by Lessandro Zampieri Wednesday, September 6, 2017 3:53 AM
    • Moved by Bill_Stewart Tuesday, November 7, 2017 9:12 PM Unanswerable drive-by question
    Wednesday, September 6, 2017 2:19 AM

All replies

  • Your question is too vague.  You need someone to fix your English.

    To compare for equal:

    Compare-Object $csv1 $csv2 -IncludeEqual -ExcludeDifferent


    Wednesday, September 6, 2017 2:40 AM
  • THis makes no sense in English " I can run something only to someone with the dates are different".

    Your example:

    Therefore, I would like to run a command only for:

    "Syed","9/10/2017 12:00:00 AM"
    "Fox","9/11/2017 12:00:00 AM"

    Shows the only two records that are identical and NOT different.

    Your CSV files have no headers.  Without correct and complete information we cannot guess at a solution.


    Wednesday, September 6, 2017 3:12 AM
  • What does " I would like to run a command only to Syed and Fox (name)" mean.  "run to".   Do you mean you only want to select those two records?

    $csv | Where{ $_.Name -match 'Syed|Fox'}


    Wednesday, September 6, 2017 3:25 AM
  • Sorry.  I cant help you because nothing you write makes any sense.  Maybe someone else can help. 

    Post here:https://social.technet.microsoft.com/Forums/it-IT/home for the Italian language version of this forum.


    Wednesday, September 6, 2017 3:50 AM