An ADSI domain explorer. <%@ Language=VBScript %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <title>ADSI Domain browser</title> </HEAD> <BODY> <!-- Author: Adrian Forbes -->
<% sDomain = Request("Domain") sComputer = Request("Computer") sGroup = Request("Group") sUser = Request("User")
if len(trim(sUser)) > 0 then Set objGroup = GetObject("WinNT://" & sDomain & "/" & sComputer & "/" & sUser) For Each objUser In objGroup.Groups Response.Write objUser.Name & "<br>" & vbCrLf Next Response.Write "</table><p><a href=adsi.asp?Domain=" & sDomain & "&Computer=" & sComputer & ">Back to " & sComputer & "</a></p>" elseif len(trim(sGroup)) > 0 then Set objGroup = GetObject("WinNT://" & sDomain & "/" & sComputer & "/" & sGroup) For Each objUser In objGroup.Members Response.Write objUser.Name & "<br>" & vbCrLf Next Response.Write "</table><p><a href=adsi.asp?Domain=" & sDomain & "&Computer=" & sComputer & ">Back to " & sComputer & "</a></p>" elseif len(trim(sComputer)) > 0 then Set objComputer = GetObject("WinNT://" & sDomain & "/" & sComputer) Response.Write "<table border=0>" For Each objObject In objComputer if strcomp(objObject.Class, "group", 1) = 0 then Response.Write "<tr><td>" & objObject.Class & "</td><td> <a href=adsi.asp?Domain=" & sDomain & "&Computer=" & sComputer & "&Group=" & objObject.Name & ">" & objObject.Name & "</a></td></tr>" & vbCrLf elseif strcomp(objObject.Class, "user", 1) = 0 then Response.Write "<tr><td>" & objObject.Class & "</td><td> <a href=adsi.asp?Domain=" & sDomain & "&Computer=" & sComputer & "&User=" & objObject.Name & ">" & objObject.Name & "</a></td></tr>" & vbCrLf else Response.Write "<tr><td>" & objObject.Class & "</td><td> " & objObject.Name & "</td></tr>" & vbCrLf end if Next Response.Write "</table><p><a href=adsi.asp?Domain=" & sDomain & ">Back to " & sDomain & "</a></p>" elseif len(trim(sDomain)) > 0 then Set objDomain = GetObject("WinNT://" & sDomain) For Each objComputer In objDomain if strcomp(objComputer.Class, "computer", 1) = 0 then Response.Write "<a href=adsi.asp?domain=" & sDomain & "&computer=" & objComputer.Name & ">" & objComputer.Name & "<br>" end if Next
Response.Write "<p><a href=adsi.asp>Back to domain list</a></p>" else Set objWinNT = GetObject("WinNT:") For Each objDomain In objWinNT if strcomp(objDomain.Class, "domain", 1) = 0 then Response.Write "<a href=adsi.asp?domain=" & objDomain.Name & ">" & objDomain.Name & "<br>" end if Next end if %>
</BODY> </HTML> |
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |
More ASP.NET Code Articles More By Adrian Forbes developerWorks - FREE Tools! | Attend this launch webcast with Scott Hebner, Vice President of IBM Rational Marketing and Strategy, for an overview of Rational’s new software offerings and resources to help modernize and accelerate software innovation on i on Power Systems – while ensuring past application investments are protected and continue to grow. Learn how these solutions are helping customers extend their core i5/OS solutions toward modern architectures such as SOA and web technologies to deliver business improvements that stand the test of time. FREE! Go There Now!
| | | | You probably have thousands of lines of COBOL code loaded with business intelligence and being used to run your business, along with an army of developers maintaining these applications. Learn how to prepare your applications and developers so you can keep that competitive edge and move to a service-oriented architecture with the IBM Rational Enterprise Modernization solutions. Replay is available for 9 months. FREE! Go There Now!
| | | | Build secure Web services with transport-level security using IBM Rational Application Developer V7 and IBM WebSphere Application Server V6.1. Follow this three-part series for step-by-step instructions about how to develop Web services and clients, configure HTTP basic authentication, and configure HTTP over SSL (HTTPS). This first part of the series walks you through building a Web service for a simple calculator application. You generate and test two different types of Web services clients: a Java Platform, Enterprise Edition (Java EE) client and a stand-alone Java client. You also handle user-defined exceptions in Web services. FREE! Go There Now!
| | | | CakePHP is a stable production-ready, rapid-development aid for building Web sites in PHP. This "Cook up Web sites fast with CakePHP" series shows you how to build an online product catalog using CakePHP. FREE! Go There Now!
| | | | Download a free trial version of IBM Rational Software Analyzer Developer Edition V7.0 to identify bug defects earlier in the software development cycle. Rational Software Analyzer is an extensible software development solution that reduces the expense of bug-fixes by enabling static analysis code reviews and bug identification very early in the development cycle. FREE! Go There Now!
| | | | This Fall, IBM Rational talks to you directly through a special teleconference series giving you access to the best minds in IBM Rational - product experts and market thought leaders who will answer your questions during these pre-scheduled telephone conference calls. Register today! FREE! Go There Now!
| | | | In this webcast, IBM Rational will discuss the importance of Web application security and will share techniques and best practices to introduce application security testing into current QA processes including: understanding common security vulnerabilities and techniques to integrate security testing with defect tracking and remediation systems in an effort to safeguard sensitive online information. FREE! Go There Now!
| | | | The Eclipse community is constantly working to extend Eclipse's functionality. In this webcast, learn about some of the most important and feature-rich projects under development. From multi-language support to plug-in development, tune in to see what Eclipse is capable of now. FREE! Go There Now!
| | | | Join this webcast to learn how IBM Rational's Functional Testing solution enables you to implement automation your way, at your pace, with your existing staff. In this webcast, you’ll learn how you can eliminate redundancy of manual test scripts, reduce errors, and increase test coverage through test automation. After this presentation you will understand how IBM Rational Functional Testing solution can streamline your manual testing and make test automation easily attainable. FREE! Go There Now!
| | | | WebSphere Process Server delivers a unique integration framework that simplifies existing IT resources. Often, as IT assets grow to support business demand, so too does their complexity and manageability. In this webcast, we’ll discuss how WebSphere Process Server helps deliver an SOA infrastructure that provides a common model to orchestrate, mediate, connect, map, and execute the underlying IT functions. Discover how WebSphere Process Server simplifies integration of business processes by leveraging existing IT assets as reusable services without the complexities of traditional integration methodologies. FREE! Go There Now!
| | | | All FREE IBM® developerWorks Tools! | |