Announcement

Collapse
No announcement yet.

Export a Search result

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Export a Search result

    I need to export a search result to notepad and I cannot find how to complete this. I ran a search listing all windows servers. Please can anyone assist?

  • #2
    Re: Export a Search result

    At the end of the cmd line you're using to run query (i.e. dsget or dsquery), include the text "> C:\myresults.txt" (without the quotes but with the space after the caret), and the results will be passed to a new text file with the path and name given. If you want to send the file somewhere else, change the path statement to what you want.

    Recommend you use a local drive as the destination path for simplicity.

    If you want to run the cmd multiple times, you can either over-write the original file or add to it, depending on whether you use a single caret (>) or double caret (>>) (can't remember which way around it is just now.) One way over-writes, the other way appends.
    *RicklesP*
    MSCA (2003/XP), Security+, CCNA

    ** Remember: credit where credit is due, and reputation points as appropriate **

    Comment


    • #3
      Re: Export a Search result

      Where are you running the search?
      If in the command prompt, do the above
      If in ADUC, I don't think you can
      Tom Jones
      MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
      PhD, MSc, FIAP, MIITT
      IT Trainer / Consultant
      Ossian Ltd
      Scotland

      ** Remember to give credit where credit is due and leave reputation points where appropriate **

      Comment


      • #4
        Export a Search result

        I need to get a list of all windows servers in my domain, when I do an advanced search Active directory gives me 271, when I pull the report from sccm we only get 155. I need to export the search result so I can determine which servers are missing the sccm agent. How do I use the dsget dommand to search for computers starting with windows server?

        Comment


        • #5
          Re: Export a Search result

          why not do a csvde -- IIRC it reports the OS as well as other information and once in Excel you can sort and search as much as you want
          Tom Jones
          MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
          PhD, MSc, FIAP, MIITT
          IT Trainer / Consultant
          Ossian Ltd
          Scotland

          ** Remember to give credit where credit is due and leave reputation points where appropriate **

          Comment


          • #6
            Export a Search result

            The answer is to use the saved query function in AD. I have now successfully exported the information I needed.

            Comment

            Working...
            X