Jump to content

noxigen

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by noxigen

  1. I know this is an old thread, but please don't just put a large group of people in "Domain Admins". Create a domain security group, put those people in it and then add that group to the local administrators group on each server that they need to manage. Even then, only if they really need full admin rights on those servers.
  2. noxigen

    Proxy Script

    It's not a script, but I just started using this tool a few weeks ago and love it! It does what you need and more. I'm just surprised I haven't found it before now. Proxy Switcher
  3. Save this VBScript snippet to Whatever.vbs. Create a text file with the name of each server per line, like: server1 server2 .... Replace "C:\servers.txt" with the name of that text and run the script from a command prompt, like: cscript /nologo Whatever.vbs Here's the code: serverList = "C:\servers.txt" Set fso = CreateObject("Scripting.FileSystemObject") servers = Split(fso.OpenTextFile(serverList, 1, False).ReadAll, vbCrLf) For Each servername In servers homePath = "\\" & servername & "\home" WScript.StdOut.WriteLine "Checking '" & homePath & "'..." If fso.FolderExists(homePath) Then On Error Resume Next For Each userFolder In fso.GetFolder(homePath).SubFolders Err.Clear WScript.StdOut.Write vbTab & "Emptying '" & userFolder & "'..." fso.DeleteFile userFolder & "\*.*", True For Each subFolder In fso.GetFolder(userFolder).SubFolders fso.DeleteFolder subFolder, True Next If Err.Number = 0 Then WScript.StdOut.WriteLine "Success!" Else WScript.StdOut.WriteLine "Failed." End If Next On Error GoTo 0 End If Next Let me know how it goes.
  4. Just set the Force argument to True. RemoveNetworkDrive Method objNetwork.RemoveNetworkDrive "p:", True
  5. You could create a simple batch file to do this. Just save the following command to CopyFiles.bat (or whatever you want to call it): xcopy /s "C:\Other Files\Misc\*.doc " "E:\Other Files\Misc\*.*" This will copy all .doc files and retain the original folder structure as well.
×
×
  • Create New...