View a Share Permission

Recently, I am being asked to come out with a script to read a share permissions and this can be achieved thru scripting with WMI…..:D Below is a sample code to read permissions from a share folder named “Share$” from a computer called “ABC-D-1234”. ===================================================== Dim strComputer Dim strShareName strComputer = “ABC-D-1234” strShareName = “Share$” […]

Posted at 7:26 am on December 7, 2007 | Leave a comment | Filed Under: MS Windows | Continue reading

Restart a service remotely

Just being asked by a few guys to have a script to restart a service remotely. Below is the example of source code to restart a “SMS Agent Host” service from a computer called “ABC-D-1234”  =====================================================  Dim strComputer Dim strServiceName  strComputer = “ABC-D-1234” strServiceName =  “CcmExec”  ‘// Stop Service   StartWin32Service strComputer, strServiceName, False  ‘// Pause to allow service to stop   Wscript.Sleep […]

Posted at 5:55 am on November 28, 2007 | Leave a comment | Filed Under: MS Windows | Continue reading

Pages

August 2017
M T W T F S S
« Dec    
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

Blog Stats

  • 28,048 hits

Categories