Jump to content

NIM

Administrator
  • Posts

    4,115
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by NIM

  1. Dim objWMIService, objProcess, colProcess, fso, objFSO1, objFile, objFolder Dim strComputer, strList, strWritePath, textFile, strFile, strDirectory, i Const OPEN_FILE_FOR_WRITING = 2 strComputer = inputbox("Enter Computer Name Here.") strFile = strComputer &".txt" strWritePath = "\\SERVER\files\Scripts\" & strFile strDirectory = "\\SERVER\files\Scripts\" i = 0 '######### Set objFSO1 = CreateObject("Scripting.FileSystemObject") If objFSO1.FileExists("\\SERVER\files\Scripts\" & strFile) Then Set objFolder = objFSO1.GetFile("\\SERVER\files\Scripts\" & strFile) Else Set objFile = objFSO1.CreateTextFile(strDirectory & strFile) 'Wscript.Echo "Just created " & objFolder & "\" & strFile objFile = "" End If '######### If strComputer > "" Then Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") Set fso = CreateObject("Scripting.FileSystemObject") Set textFile = fso.OpenTextFile(strWritePath, OPEN_FILE_FOR_WRITING) Set colProcess = objWMIService.ExecQuery _ ("Select * from Win32_Process") For Each objProcess in colProcess strList = strList & i & " " & objProcess.Name & vbCrLf i = i + 1 Next textFile.WriteLine(strList) Wscript.Echo strList Wscript.Echo "Done..." Else End If WScript.Quit PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR NOTEPAD!!! Make sure you replace \\SERVER\files\Scripts\ with your UNC server path which you want to log to. *Make sure that you have write ability to the file path.
  2. On error resume next Dim objADO Dim objContainer Dim objChild Dim User Wscript.Echo "The output will be written to C:\oldComputers.txt" set objADO = GetObject("LDAP://ou=workstations,ou=liverpool,dc=contoso,dc=local") set WshShell = WScript.CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") fso.DeleteFile ("C:\oldComputers.txt") set txtStream = fso.OpenTextFile("C:\oldComputers.txt", 8, True) txtStream.WriteLine vbCrLf set objContainer = objADO For each objChild in objContainer user = MID(objChild.Name,4) If DateDiff ("d",objChild.LastLogin, Now) > 180 then txtStream.WriteLine user & " ---> " & DateDiff ("d",objChild.LastLogin, Now)_ & " Days since last login." & vbCrLf Next msgbox "Done..." WshShell.run "C:\oldComputers.txt" PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR SCRIPT!!! To make this script work you will need one thing! You will need the OU in which your computer accounts are kept. Edit the string LDAP:// (e.g., 'LDAP://OU=workstations,OU=boston,DC=contoso,DC=com') The script will be written to the root of the c:\ drive. *Make sure you are an administrator to run this.
  3. On error resume next strComputer = InputBox("Type in the name of the computer you want to query.") If strComputer > "" Then Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colComputer = objWMIService.ExecQuery _ ("Select * from Win32_ComputerSystem") For Each objComputer in colComputer Wscript.Echo objComputer.UserName Next Else Wscript.Quit End If Wscript.Quit
  4. Even drive icons are changed to Vista style. Nice add-on and very useful too If you wan't to revert to default settings you should do this: Start --> Run This will fix it back to default: REG Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons /f This will remove all customized icons on the drives and set them back to default icons inside the shell32.dll (may require refresh F5, or just quit My Computer and run it again).
  5. That's preety nice :thumbsup: Thx wolf!
  6. NIM

    Forum Icons

    Yup, true...Wolf changed all the icons on this forum and helt started with big buttons (new message, add reply etc).
  7. NIM

    Forum Icons

    Guys, don't get frustrated if you see few new icons now and then since we're trying to find the best choice for this forum... WolfX2 and Helt are doin' much work here.. Thx to them will have this skin modified for Wincert :thumbsup:
  8. That's the point Luc, 'cause helt stated that they have brand new font
  9. Yes, unfortunatelly our hosting provider has big troubles with SQL server. Seems like there's a faulty RAM in the server. Every now and then I get mail stating that DB could not be contacted. I hope that they'll fix this problems soon, but no matter what, wincert will be on the new hosting provider in about a month. So please be patient 'cause after we move to another server we shouldn't have any more problems..
  10. I like it :w00t: NVidia all the way :thumbsup:
  11. @kels, yup, the same one I have @ my work...Really nice peace of hardware :thumbsup:
  12. Dirty ducks are here.. :lol:
  13. Thx, currently we miss only 2 to have 200 smileys on this board. :bounce8:
  14. Impressive, now how the games will look like :naughty: Another new graphic card needed :sigh:
  15. NIM

    Must see!!!

    LOOOL, what on earth is that :lol:
  16. http://www.theinquirer.net/default.aspx?article=32550 Thx Rick
  17. Now, that's a mouse, you can't miss with Microsoft hardware products :naughty:
  18. NIM

    HI!

    Welcome helt, do I know you from somewhere. Oh yes, I remember now, you gave me those .php and .css instructions and helped me a lot for a new site :w00t: Welcome!
  19. Link is dead: "permission denied"
  20. LOL, you made me laugh with this sentence As for the JaCro's post, my opinion is that no one would do this, this pic is made just for a laugh, nothing else, but you never know, the world is full of sick people..
  21. I have to apologize to our 4 newest members 'cause they haven't received validation mail. I've approved this accounts manually and I hope that this problem will be fixed today..
  22. LOOOOOOOOOOOOOOOOOOL, nice one.... :clap:
  23. Much better news admin panel :naughty:
  24. :hump: LOL, Hilarious, nice one Rick :thumbs_up:
×
×
  • Create New...