Solved

NT4 Server Manager

Posted on 2004-03-20
5
498 Views
Last Modified: 2013-12-23
Hi

Does anybody know a utility that will show me all inactive computers/servers in Server Manager (NT4 Server), along with the date which they last connected to the domain?  

Many thanks

Mick
0
Comment
Question by:m1ck99
  • 3
5 Comments
 
LVL 4

Expert Comment

by:jcoppin
ID: 10645705
i have a vb script if your interested, it will query the domain, dump a list of computers and then delete them from the domain if they haven't logged in in a given period of time.
0
 
LVL 4

Expert Comment

by:jcoppin
ID: 10645728
create a textfile called dclist.txt in the same directory you are running the script from. add all your domain controllers to this file. change intAccountAge = 60 to suite your needs, i have found that any pc that hasn't logged in in 60 days  has generally been reimaged/reinstalled and given a new name. hope this helps


****************copy and paste below**********************
On error Resume Next
Const ForReading = 1
Const ForWriting = 2
Dim objFSO, objCompFile, objDCFile, objDomain, objComp, objNTComp
Dim strCompFile, strDCFile
Dim strDomain, strDCList
Dim intSecInADay, intAccountAge

strCompFile = "InactivePCs.txt"
strDCFile = "DCList.txt"
strDomain = inputbox("Enter Domain")

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objCompFile = objFSO.OpenTextFile(strCompFile, ForWriting, TRUE)
Set objDCFile = objFSO.OpenTextFile(strDCFile, ForReading)
Set objDomain = GetObject("WinNT://" & strDomain)
objDomain.Filter = Array("Computer")
strDCList = objDCFile.ReadAll()
intSecInADay = 60 * 60 * 24
intAccountAge = 60

For Each objComp In objDomain
    Set objNTComp = GetObject("WinNT://" & strDomain & "/" & objComp.Name & "$")
    If (objNTComp.PasswordAge > intSecInADay * intAccountAge) Then
        If InStr(1, strDCList, objComp.Name, vbTextCompare) = 0 Then
             Call objDomain.Delete("Computer", objComp.Name)
             objCompFile.Writeline objNTComp.Name & "-- computer account has been deleted"
        End If
    End If
Next

*******************END COPY AND PASTE***********************
0
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
ID: 10675464
m1ck99, what's your definition of "inactive computers/servers"? do you mean those computers that ever logged on the network (appeared in the computer list of network neighborhood)? you want to know the date of their last logon?
0
 

Author Comment

by:m1ck99
ID: 10675644
Hi

dcoplin

Thanks to dcoplin for replying. I will try it inthe next few days

bbao

Yes, you are right , i want to  know the last date of their logon.

Thanks for replying

Mick
0
 
LVL 4

Accepted Solution

by:
jcoppin earned 250 total points
ID: 10678015
This script will delete any computer account older than 60 days, that is 60 days without logging onto the network
to run it without deleting just change           Call objDomain.Delete("Computer", objComp.Name)  to 'Call objDomain.Delete("Computer", objComp.Name)


It will then generate a list of computers that will be deleted but will not delete them till you run it again and uncomment that line


 
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now