Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
Option Explicit Dim strHomeFolder, strHome, strUser Dim objFSO, objShell, intRunError Dim oFSO, sFile, oFile, sText ' Note you will have to amend the following variables strHome = "D:\Users\" Set objFSO = CreateObject("Scripting.FileSystemObject") Set oFSO = CreateObject("Scripting.FileSystemObject") sFile = "D:\Users\users.txt" ' Create a shell for cmd and CACLS Set objShell = CreateObject("Wscript.Shell") ' Here is the loop that cycles through the cells If oFSO.FileExists(sFile) Then Set oFile = oFSO.OpenTextFile(sFile, 1) Do While Not oFile.AtEndOfStream sText = oFile.ReadLine If Trim(sText) <> "" Then strUser = sText call HomeDir ' I decided to use a subroutine End If Loop oFile.Close Else WScript.Echo "The file was not there." End If Sub HomeDir() strHomeFolder = strHome & strUser If strHomeFolder <> "" Then If Not objFSO.FolderExists(strHomeFolder) Then On Error Resume Next objFSO.CreateFolder strHomeFolder If Err.Number <> 0 Then On Error GoTo 0 Wscript.Echo "Cannot create: " & strHomeFolder End If On Error GoTo 0 End If If objFSO.FolderExists(strHomeFolder) Then ' Assign user permission to home folder. intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls "_ & strHomeFolder & " /E /c /g " & strUser & ":C" , 2, True) If intRunError <> 0 Then Wscript.Echo "Error assigning permissions for user " _ & strUser & " to home folder " & strHomeFolder End If End If End If End Sub WScript.Quit