Jump to content

Recommended Posts

Posted (edited)

We have a group in AD where all the users go where there internet has been disabled. a script i use to make a html page so anyone can see the users in the group. Set on a task on the server that polls it every 15 mins and recreates the html document.

 

Dim objGroup, objUser, objFSO, objFile, strDomain, strGroup, Domain, Group

strDomain = "DOMAIN NAME"

strGroup = "Ban Internet"

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFile = objFSO.CreateTextFile("\\192.168.16.28\c$\inetpub\Internet Ban

\index.html")

Set objGroup = GetObject("WinNT://" & strDomain & "/" & strGroup & ",group")

 

objFile.WriteLine ""

objFile.WriteLine "

"

objFile.WriteLine "

"<p> objFile.WriteLine "</p>"

objFile.WriteLine ""

objFile.WriteLine "

"

objFile.Write"

Internet Ban List

"

objFile.WriteLine "

If you have any issues with this email

[email protected]

The ban is for a week unless stated

otherwise.

"

For Each objuser In objGroup.Members

objFile.WriteLine objuser.Name & " - " & objuser.Fullname & " - " &

objUser.description & "

"

 

Next

objFile.WriteLine "

Created on"

objfile.writeline (FormatDateTime(date(),vblongdate))

objfile.write (time())

objfile.writeLine "

This is refreshed every 15mins"

objfile.writeline ""

 

objFile.WriteLine ""

 

objFile.WriteLine ""

objFile.Close

Set objFile = Nothing

Set objFSO = Nothing

Set objUser = Nothing

Set objGroup = Nothing

Edited by Danlewis3
email

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...