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 | read on

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 | read on

Pages

 

January 2012
M T W T F S S
« Dec    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

Blog Stats

  • 13,087 hits

Categories


Follow

Get every new post delivered to your Inbox.