Kaseya Community

Reporting on Network Shares

  • I'm trying to get a report that shows all the servers and what their current network shares are.

    I cant find this in any of the standard reports. Does anyone have something like this?

    Legacy Forum Name: Reporting on Network Shares,
    Legacy Posted By Username: swilson
  • The simplest way would be to run the "net share" command. You could use a script to run the command redirecting the output to a file, get the file contents in a variable, write the variable contents to the script log. Then you could just use the log reports to get all the results.

    Good luck,

    Matt

    Legacy Forum Name: How-To,
    Legacy Posted By Username: connectex
  • you could use something like this:


    Script Name: Dump hard drive and mapped drive info and email
    Script Description: dumps all hard drive and unc paths to a variable and emails to a recipient

    IF True
    THEN
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : agenttemp
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net share >> #agenttemp#\drives.txt
    Parameter 2 : 0
    OS Type : 0
    Get Variable
    Parameter 1 : 1
    Parameter 2 : #agenttemp#\drives.txt
    Parameter 3 : driveinfo
    OS Type : 0
    Send Email
    Parameter 1 : email@changeme.org
    Parameter 2 : test
    Parameter 3 : #driveinfo#
    OS Type : 0
    ELSE


    that will dump a net share to text file then email to you. run this on whatever computers you want to see the shares on.

    (my 5 second answer to the issue ) Smile

    Legacy Forum Name: How-To,
    Legacy Posted By Username: saybrook
  • If you add net use to this sccript you will also get the mapped drives to get a complete picture.

    Script Name: Dump hard drive and mapped drive info and email
    Script Description: dumps all hard drive and unc paths to a variable and emails to a recipient

    IF True
    THEN
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : agenttemp
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net share >> #agenttemp#\drives.txt
    Parameter 2 : 0
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net use >>>> #agenttemp#\drives.txt
    Parameter 2 : 0
    OS Type : 0
    Get Variable
    Parameter 1 : 1
    Parameter 2 : #agenttemp#\drives.txt
    Parameter 3 : driveinfo
    OS Type : 0
    Send Email
    Parameter 1 : email@changethis.com
    Parameter 2 : test
    Parameter 3 : #driveinfo#
    OS Type : 0
    ELSE

    Legacy Forum Name: How-To,
    Legacy Posted By Username: carey-pccare