Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to check account access to about 700 servers with Windows Server 2003.
We had access to all these servers, but over the years some of the servers changed owners and my group no longer have access to those servers. Now I have to check which servers we no longer suport.
The only method I know is to login via Remote Desktop, but there must be some way to do it automatically.
Could you tell me is there a way of simply checking access to server from any kind of programing language or script?

share|improve this question

I Suggest you check out this link. I would think it will give an error that you can catch when the connection fails.

share|improve this answer

If you want to kick it old school, you can do this with a list of servers (dumped from AD?) and batch.

for /f "tokens=* delims= " %%s in (servers.txt) do (
sc \\%%s query "W32Time" | findstr /c:"FAILED"
if errorlevel 1 echo %%s >> access.txt
)

for /f "tokens=* delims= " %%a in (servers.txt) do (
find "%%a" < access.txt > nul
if errorlevel 1 echo %%a >> accessdenied.txt
)

There are probably easy ways to do it in other languages, too, but I had that one lying around.

You may have to tweak the service and the error string for your environment.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["                    <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2016 Stack Exchange Inc; user contributions licensed under <a href=\"https://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2016.5.27.3620\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Server Fault works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </noscript>\r\n<script>"], "copyright__copyright__copyright": [" %%a in (servers.txt) do (\nfind \"%%a\" < access.txt > nul\nif errorlevel 1 echo %%a >> accessdenied.txt\n)\n\nThere are probably easy ways to do it in other languages, too, but I had that one lying around.\n\nYou may have to tweak the service and the error string for your environment.\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}