Powershell to compare two files

Posted on 2012-08-20
Last Modified: 2012-08-20

I have an excel file with two columns.

Column1 has a list of assets that we sent to a storage company.

Column2 lists the assets that they are returning to us.

I need to ensure that:

i. There is nothing from Column1 that is missing in Column2

ii. There is nothing extra in Column2 that is not in Column1

So, basically, I need to compare the two columns.

Is there a straightforward method to do this via Powershell?
Question by:richlionel
    LVL 12

    Accepted Solution

    You can do this with powershell. This link has details and examples:
    LVL 15

    Expert Comment

    by:David L. Hansen
    If the two columns should contain the exact same data when all is said and done, why not just use conditional formatting to colorize the cells in column 1 which do not exist anywhere in column 2?

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
    How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now