bsharath
asked on
Find all that connect to my shares Keep a record of them.
Hi,
Is there a way a script that can run every 5min and record all the sessions.All the users that access my shares.
Get all data to a neatly formatted txt file.
Regards
Sharath
Is there a way a script that can run every 5min and record all the sessions.All the users that access my shares.
Get all data to a neatly formatted txt file.
Regards
Sharath
here's a vbscript
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=imper sonate}!\\ " & strComputer & "\root\cimv2")
Set colShares = objWMIService.ExecQuery("S elect * from Win32_Share")
For each objShare in colShares
Wscript.Echo "Allow Maximum: " & objShare.AllowMaximum
Wscript.Echo "Caption: " & objShare.Caption
Wscript.Echo "Maximum Allowed: " & objShare.MaximumAllowed
Wscript.Echo "Name: " & objShare.Name
Wscript.Echo "Path: " & objShare.Path
Wscript.Echo "Type: " & objShare.Type
Next
usage: c:\> cscript /nologo myscript.vbs > newly_formatted_file
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=imper
Set colShares = objWMIService.ExecQuery("S
For each objShare in colShares
Wscript.Echo "Allow Maximum: " & objShare.AllowMaximum
Wscript.Echo "Caption: " & objShare.Caption
Wscript.Echo "Maximum Allowed: " & objShare.MaximumAllowed
Wscript.Echo "Name: " & objShare.Name
Wscript.Echo "Path: " & objShare.Path
Wscript.Echo "Type: " & objShare.Type
Next
usage: c:\> cscript /nologo myscript.vbs > newly_formatted_file
ASKER
Hi,
This script gets me all the shares that i have.But i want it to get the sessions that are running.So that i can schedule it and it can run every min .So that it goes on recording all the activities of the share.
Any way to get this...
This script gets me all the shares that i have.But i want it to get the sessions that are running.So that i can schedule it and it can run every min .So that it goes on recording all the activities of the share.
Any way to get this...
This is provided by the Share Monitor tool.
_______________
Nayer Naguib
_______________
Nayer Naguib
ASKER
Find all that are connected to my shares and keep a record in a file...Any Help...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.novell.com/coolsolutions/tools/18211.html
http://www.mp3vcr.com/sharemonitor/
_______________
Nayer Naguib