Another DOOZIE!

Author Message
djrevelation

  • Total Posts : 17
  • Scores: 0
  • Reward points : 0
  • Joined: 3/11/2009
  • Status: offline
Another DOOZIE! Tuesday, April 14, 2009 6:13 AM (permalink)
0
I have a mission for anyone who thinks they can do it...

I have two Excel spreadsheets. Each spreadsheet has almost the same data. See below:

XLS01

SERVER NAME| DOMAIN NAME   | LOCAL ADMIN
-------------------------------------------------------------
MSServer1      |       Local User    |    Administrator
-------------------------------------------------------------
MSServer1      |         Domain1     |   Domain Admins
-------------------------------------------------------------
MSServer1      |         Domain2     |   Domain Admins
-------------------------------------------------------------
MSServer02    |       Local User    |   Administrator
-------------------------------------------------------------
MSServer02    |         Domain1     |  Domain Admins

XLS02

SERVER NAME| DOMAIN NAME   | LOCAL ADMIN
-------------------------------------------------------------
MSServer1      |       Local User    |    Administrator
-------------------------------------------------------------
MSServer1      |         Domain1     |   Domain Admins
-------------------------------------------------------------
MSServer1      |         Domain2     |   Domain Admins
-------------------------------------------------------------
MSServer02    |       Local User    |   Administrator
-------------------------------------------------------------
MSServer02    |         Domain1     |  Domain Admins
-------------------------------------------------------------
MSServer02    |         Domain1     | Backup Operators

NOW COMES THE FUN PART..
I want to build a PS script that will see the differences (see last entry in XLS02) and create a NEW XLS file that shows me the Computer name, the difference, and whether it was added or removed from the control file (XLS01).

Is anyone up to the challenge? Can anyone even help me figure this one out??? Someone's gotta have a clue to get this to work.

Thank you in advance.

Matthew Jaramillo




 
#1
    ebgreen

    • Total Posts : 8219
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    RE: Another DOOZIE! Monday, April 20, 2009 7:24 AM (permalink)
    0
    I'll give you a big picture answer. If this were my problem then here is how I would approach it:

    • Use Import-CSV to slurp document 1 into a variable
    • Use Import-CSV to slurp document 2 into a variable
    • Use Compare-Object to compare those two variables for differences.
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      djrevelation

      • Total Posts : 17
      • Scores: 0
      • Reward points : 0
      • Joined: 3/11/2009
      • Status: offline
      RE: Another DOOZIE! Friday, May 29, 2009 4:27 AM (permalink)
      0
      Okay, I got the data imported, but am having issues with getting the differences read. It gives me a list of the servers, and info above, but that's it.

      Any more help would be appreciated, guys. Thanks!
       
      #3
        ebgreen

        • Total Posts : 8219
        • Scores: 98
        • Reward points : 0
        • Joined: 7/12/2005
        • Status: offline
        RE: Another DOOZIE! Friday, May 29, 2009 5:31 AM (permalink)
        0
        st the code that you are using abd a detailed explanation of how it fails.
        "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
        Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
        http://www.visualbasicscript.com/m_47117/tm.htm
         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • New Messages
          • No New Messages
          • Hot Topic w/ New Messages
          • Hot Topic w/o New Messages
          • Locked w/ New Messages
          • Locked w/o New Messages
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9