Announcement

Collapse
No announcement yet.

Net View Shares

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

  • Net View Shares

    We are looking for a simple way that will allow us to net view our server's shares into a txt file. We have NT, 2K, and 2K3 servers. We've been playing with the pstools to get the commands to run locally but we're having a problem getting the tools to export to a file. We may be turning in circles here but if you could point us in the general direction, that would be great!

    TIA

  • #2
    Re: Net View Shares

    How about this:

    net view \\<Server Name> > c:\textfilename.txt

    Michael
    Michael Armstrong
    www.m80arm.co.uk
    MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

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

    Comment


    • #3
      Re: Net View Shares

      Yes, but that only does one server at a time. Ideally we would like it to net view a serverlist.txt and pipe it to serverresults.txt or something like that.

      Comment


      • #4
        Re: Net View Shares

        Here it is....must be the fresh pot of coffee:

        FOR /F %%a IN (c:\test.txt) DO net view \\%%a >>c:\testlist.txt

        Thought I'd post it for others if they ever need it.

        Comment


        • #5
          Re: Net View Shares

          Was just digging through my old code (I cant remember this stuff as I dont really code much)

          Glad it's sorted and thanks for posting the answer. I'm sure someone will benefit from it.

          Michael
          Michael Armstrong
          www.m80arm.co.uk
          MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

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

          Comment

          Working...
          X