vb script to read txt file and excute icacls

Hi

I have a big list of usernames with exclusive folder permissions that i need to reset.

Can someone help create a vs script to read each line in the txt file and run:

icacls "\\Server1\User$\USERNAME\Documents" /Reset /t /c /l /q

January 12th, 2014 7:41pm

Hi,

What does your script look like so far?

Bill

Free Windows Admin Tool Kit Click here and download it now
January 12th, 2014 8:20pm

Set objFSO  = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\userlist.txt")
Set oShell  = WScript.CreateObject("WSCript.shell")

Do Until objFile.AtEndOfStream
strusername = objFile.ReadLine
oshell.run (icacls "\\server01\users$\"+ strusername /Reset /t /c /l /q")
Loop
January 12th, 2014 8:57pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics