Remove a Windows Service via registry

There are two ways we can do this. The quick way us..

1) At a domain controller drop to a command prompt. Then enter the below

dsquery user -inactive  -limit 0 | dsget user -fn -ln -samid >>C:\inactive_users.txt

where <NumberOfWeeks> is integer number. This will output your inactive users to the defined txt file.

2) In Active Directory users and computers, right click ‘Saved Queries’, then New -> New Query.

save query

save query

Give the query a name then select the root you wish to query, click ‘Define Query’ and select Users tab, then select ‘Days Since last logon‘.

Then, when it’s run, right click the completed query and export to csv or whatever you want.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: