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$” [...]
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 [...]