Issue with Import-CSV - The member is already present

Welcome Forums General PowerShell Q&A Issue with Import-CSV - The member is already present

This topic contains 1 reply, has 1 voice, and was last updated by

1 year, 1 month ago.

  • Author
  • #93618

    Points: 32
    Rank: Member

    I am having an issue importing a 7MB CSV. I am importing 2 CSV files to use for comparison purposes via Compare-Object. The 2 CSV files are almost identical (same 3 headers, just different settings below them). The one CSV imports fine, but the other returns the error:

    import-csv : The member "6ALAN.Admins to Local Admins Group" is already present.
    At line:2 char:10
    + $file1 = import-csv -Path "C:\Scripts\GPOCompare\ALLGPOExport1.csv"

    Here are the top 9 lines in EACH CSV file.

    GPO Name,Setting Path,Setting Value
    ALAN.Admins to Local Admins Group,METADATA|GUID,{D762C613-81A6-4AC8-83EA-175E26DEA1E4}
    ALAN.Admins to Local Admins Group,METADATA|Status,User configuration settings disabled
    ALAN.Admins to Local Admins Group,METADATA|Owner,GOLDLNK\Domain Admins
    ALAN.Admins to Local Admins Group,METADATA|Created Time,10/10/2006 20:00
    ALAN.Admins to Local Admins Group,METADATA|Modified Time,8/16/2016 4:17
    ALAN.Admins to Local Admins Group,METADATA|Version|Computer|AD,6
    ALAN.Admins to Local Admins Group,METADATA|Version|Computer|SYSVOL,6
    ALAN.Admins to Local Admins Group,METADATA|Version|User|AD,0

    Any ideas why I'm getting this error?

  • #93621

    Points: 32
    Rank: Member

    Once again, was able to figure it out so disregard my original post. It looks like one of the CSV files was formatted in a strange way. I fixed the formatting and was able to run the script successfully.

The topic ‘Issue with Import-CSV - The member is already present’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort