'Active Directory'에 해당되는 글 7건

  1. 2008/07/23 사용자의 RTC 정보를 보는 코드
  2. 2008/03/27 Exchange를 설치하지 않고 AD 스키마 확장
  3. 2007/09/16 Active Directory User/Group Encapsulation Classes
  4. 2007/09/12 Moss Authentication Active directory
  5. 2007/09/06 Active directory how to
  6. 2007/09/06 Active Directory ㅠ_ㅠ
  7. 2007/09/05 Active directory 제어
2008/07/23 12:28

사용자의 RTC 정보를 보는 코드

출처 : Read RTC properties from active directory users
http://www.haverhoek.nl/index.php?/archives/22-Read-RTC-properties-from-active-directory-users.html


이 스크립트는 AD의 사용자중에 RTC 활성화된 사용자의 RTC 정보를 읽을 수 있는 스크립트입니다.
This script reads all RTC properties from all RTC enabled users from Active Directory.

파일을 적당한 이름의 *.vbs 로 저장한 후 실행해 보시면 됩니다.

사용자가 많을 경우 Alert 창이 여러번 뜨기 때문에 출력방식을 바꾸거나 파일로 저장하도록 하는 방법도 좋을듯 하네요.

On Error Resume Next

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection

' Search for users that are RTC enabled
objCommand.CommandText = "Select samAccountName,msRTCSIP-PrimaryUserAddress,msRTCSIP-FederationEnabled" & _
",msRTCSIP-ArchivingEnabled,msRTCSIP-InternetAccessEnabled,msRTCSIP-Line,msRTCSIP-LineServer" & _
",msRTCSIP-UserEnabled,msRTCSIP-UserExtension,msRTCSIP-UserPolicy,telephoneNumber,mail" & _
",msRTCSIP-OptionFlags,msRTCSIP-OriginatorSid,msRTCSIP-PrimaryHomeServer,msRTCSIP-TargetHomeServer " & _
"from 'LDAP://dc=domain,dc=local' " & _
"where objectClass='user' and msRTCSIP-UserEnabled=TRUE"

objCommand.Properties("Page Size") = 1000
objCommand.Properties("Timeout") = 30
objCommand.Properties("Searchscope") = 2
objCommand.Properties("Cache Results") = False
Set objRecordSet = objCommand.Execute

Do Until objRecordSet.EOF
strAccountName = objRecordset.Fields("samAccountName").Value
wscript.echo "strAccountName = " & strAccountName

strURI = objRecordset.Fields("msRTCSIP-PrimaryUserAddress").Value
wscript.echo "strURI = " & strURI

bFederationEnabled = objRecordset.Fields("msRTCSIP-FederationEnabled").Value
wscript.echo "bFederationEnabled = " & CStr(bFederationEnabled)

strArchivingEnabled = objRecordset.Fields("msRTCSIP-ArchivingEnabled").Value
wscript.echo "strArchivingEnabled = " & strArchivingEnabled

bInternetAccessEnabled = objRecordset.Fields("msRTCSIP-InternetAccessEnabled").Value
WScript.Echo "bInternetAccessEnabled = " & CStr(bInternetAccessEnabled)

strLine = objRecordset.Fields("msRTCSIP-Line").Value
WScript.Echo "strLine = " & strLine

strLineServer = objRecordset.Fields("msRTCSIP-LineServer").Value
WScript.Echo "strLineServer = " & strLineServer

intOptionFlags = objRecordset.Fields("msRTCSIP-OptionFlags").Value
WScript.Echo "intOptionFlags = " & intOptionFlags

sidOriginatorSid = objRecordset.Fields("msRTCSIP-OriginatorSid").value
WScript.Echo "sidOriginatorSid = " & sidOriginatorSid

strPrimaryHomeServer = objRecordset.Fields("msRTCSIP-PrimaryHomeServer").value
WScript.Echo "strPrimaryHomeServer = " & strPrimaryHomeServer

strTargetHomeServer = objRecordset.Fields("msRTCSIP-TargetHomeServer").value
WScript.Echo "strTargetHomeServer = " & strTargetHomeServer

bUserEnabled = objRecordset.Fields("msRTCSIP-UserEnabled").value
WScript.Echo "bUserEnabled = " & CStr(bUserEnabled)

strUserExtension = objRecordset.Fields("msRTCSIP-UserExtension").value
WScript.Echo "strUserExtension = " & strUserExtension

binUserPolicy = objRecordset.Fields("msRTCSIP-UserPolicy").value
WScript.Echo "binUserPolicy = " & binUserPolicy

strTelephoneNumber = objRecordset.Fields("telephoneNumber").value
WScript.Echo "strTelephoneNumber = " & strTelephoneNumber

strMail = objRecordset.Fields("mail").value
WScript.Echo "strMail = " & strMail

WScript.Echo "================================================="

objRecordSet.MoveNext
Loop


objRecordSet.Close
Set objRecordSet = Nothing
Set objCommand = Nothing
objConnection.Close
Set objConnection = Nothing





크리에이티브 커먼즈 라이선스
Creative Commons License
올블로그추천버튼 블코추천버튼 블로그뉴스추천버튼 믹시추천버튼 한RSS추가버튼 구글리더기추천버튼


이 포스팅이 도움이 되었다면 구글에서 관련 정보를 찾아 보세요 ^^


Trackback 0 Comment 0

Trackback : http://i-ruru.com/trackback/357 관련글 쓰기

2008/03/27 14:07

Exchange를 설치하지 않고 AD 스키마 확장

Active Directory에는 MS에서 제공하는 여러 정보를 저장할 수 있도록 속성들을 정의해 두었고, 이를 확장할 수 있도록 되어있다.


Exchange에서는 또 AD를 확장해 설치하고 그에 필요한 정보를 담고 있는데 Exchange 서버를 설치하지 않고 Exchange의 Active Directory 스키마 확장하는 방법이 가끔 필요할 때가 있다.


이럴 때에 다음과 같은 기술문서를 참고하도록 하자.

 http://support.microsoft.com/?scid=327757

네이버 통합검색 :: 스키마 확장


위 문서에는 다음과 같은 내용을 포함한다.


more..

크리에이티브 커먼즈 라이선스
Creative Commons License
올블로그추천버튼 블코추천버튼 블로그뉴스추천버튼 믹시추천버튼 한RSS추가버튼 구글리더기추천버튼


이 포스팅이 도움이 되었다면 구글에서 관련 정보를 찾아 보세요 ^^


Trackback 0 Comment 0

Trackback : http://i-ruru.com/trackback/309 관련글 쓰기

2007/09/16 19:14

Active Directory User/Group Encapsulation Classes

참조 주소 : http://www.codeproject.com/cs/internet/StorerActiveDirectory.asp

AD를 사용하기 쉽도록 제공되는 Class 이다.


Download source and demo projects - 34.9 KB
크리에이티브 커먼즈 라이선스
Creative Commons License
올블로그추천버튼 블코추천버튼 블로그뉴스추천버튼 믹시추천버튼 한RSS추가버튼 구글리더기추천버튼


이 포스팅이 도움이 되었다면 구글에서 관련 정보를 찾아 보세요 ^^


Trackback 0 Comment 0

Trackback : http://i-ruru.com/trackback/167 관련글 쓰기

2007/09/12 10:58

Moss Authentication Active directory

Authentication samples
http://technet2.microsoft.com/Office/en-us/library/23b837d1-15d9-4621-aa0b-9ce3f1c7153e1033.mspx?mfr=true

Use Forms Authentication with SQL Server in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/ms998317.aspx

Active Directory Role provider
http://www.codeplex.com/adrp

크리에이티브 커먼즈 라이선스
Creative Commons License
올블로그추천버튼 블코추천버튼 블로그뉴스추천버튼 믹시추천버튼 한RSS추가버튼 구글리더기추천버튼


이 포스팅이 도움이 되었다면 구글에서 관련 정보를 찾아 보세요 ^^


Trackback 0 Comment 0

Trackback : http://i-ruru.com/trackback/164 관련글 쓰기

2007/09/06 16:54

Active directory how to

아 AD, LDAP... 죽일넘들 ㅡㅡ;;


  • How to create a file share using .Net framework
  • How to add a user to file access permissions
  • How to get file security information using DirectoryServices
  • How to get list of groups user is member of
  • How to get list of domains in Active Directory
  • How to get members of a windows group.
  • How to get user SID using DirectoryServices classes
  • How to add a new user account in your machine or domain?
  • How to get full name of logged in user.
  • How to display schema information of Active Directory object using Directory Services in ASP.Net
  • How to use Active Directory classes in ASP.Net to enumerate AD Users
  • How to use Active Directory classes in ASP.Net to enumerate AD Groups
  • How To Enumerate Web Application Directories in IIS Using DirectoryServices




  •  


    In our previous article, How to get full name of logged in user, we showed how you can get full name of a user in a given domain or machine. You can extend that idea to obtain any information you want for a given user. This artcile will describe how you can add a new user account into your domain or machine using .Net DirectoryServices classes. We will be using WinNT provider for illustrations in this article. But you can extend the examples to use LDAP or AD providers.

    Details

    Here are the key steps that you will need to perform to create new account.

    • Create a new DirectoryEntry object and specify the machine name as the path.
    • User accounts are created as nodes corrresponding to User schema class in Active Directory. Therefore we will add a new DirectoryEntry object in Children collection of the machine. The key thing to rememeber will be that when you add new entry, make sure that the schema class name is User.
    • When you add a new node in Children collection, it will return you the newly created object. At this stage the information has not been added to your machine or active directory tree.
    • Now you can set all the values that you need to set for a given account. Following is the list of property names that you can set for the account.
      • UserFlags
      • MaxStorage
      • PasswordAge
      • PasswordExpired
      • LoginHours
      • FullName
      • Description
      • BadPasswordAttempts
      • LastLogin
      • HomeDirectory
      • LoginScript
      • Profile
      • HomeDirDrive
      • Parameters
      • PrimaryGroupID
      • Name
      • MinPasswordLength
      • MaxPasswordAge
      • MinPasswordAge
      • PasswordHistoryLength
      • AutoUnlockInterval
      • LockoutObservationInterval
      • MaxBadPasswordsAllowed
      • RasPermissions
      • objectSid

      For more information on these properties please read Active Directory Services Interface(ADSI) section in Microsoft Platform SDK.

    • You must have noticed from the above list that there is no property to set or get user password value. Operating system does not give access to clear text password value. So we can't expect and property or method to get it. In ADSI, IAdsUser interface provides SetPassword method to set a user's password. This is where Invoke method of DirectoryEntry class comes handy. So we call Invoke to set the password value. The Invoke method can be used to call native methods on underlying active directory objects. There is one important thing to remeber when you set a user's password value. If you are using LDAP provider, then the user account should already have been created in the system by calling CommitChanges or SetInfo method. But WinNT provider does not have this restriction. You can set password value without commiting the changes first.
    • The last step would be to actually create the account in the machine or domain. This is done by calling CommitChanges method on newly added DirectoryEntry object.

    The following code demonstrates all the steps that we described above.

    private void AddUser(string strDoamin, string strLogin, string strPwd)
    {
        DirectoryEntry obDirEntry = null;
        try
        {
            obDirEntry = new DirectoryEntry("WinNT://" + strDoamin);
            DirectoryEntries entries = obDirEntry.Children;
            DirectoryEntry obUser = entries.Add(strLogin, "User");
            obUser.Properties["FullName"].Add("Amigo");
            object obRet = obUser.Invoke("SetPassword", strPwd);
            obUser.CommitChanges();
        }
        catch (Exception ex)
        {
            Trace.Warn(ex.Message);
        }
    }

    Please feel free

    크리에이티브 커먼즈 라이선스
    Creative Commons License

    'Microsoft > SPS/MOSS' 카테고리의 다른 글

    Active Directory를 이용한 Form Authentication의 접근 방향  (0) 2007/09/11
    MOSS Form based authentication  (0) 2007/09/07
    Active directory how to  (0) 2007/09/06
    Active Directory ㅠ_ㅠ  (0) 2007/09/06
    MOSS 테크넷  (0) 2007/09/05
    Active directory 제어  (0) 2007/09/05
    올블로그추천버튼 블코추천버튼 블로그뉴스추천버튼 믹시추천버튼 한RSS추가버튼 구글리더기추천버튼


    이 포스팅이 도움이 되었다면 구글에서 관련 정보를 찾아 보세요 ^^


    Trackback 0 Comment 0

    Trackback : http://i-ruru.com/trackback/161 관련글 쓰기

    2007/09/06 10:40

    Active Directory ㅠ_ㅠ

    이런 그지같은 AD ㅠㅠ

    http://msdn2.microsoft.com/en-us/library/aa772218.aspx
    Active Directory Service Interfaces(ADSI) Reference

    http://msdn2.microsoft.com/en-us/library/aa367008.aspx
    Lightweight Directory Access Protocol(LDAP)




    Active Dirctory를 이용한 경로 정보 전체보기

    //-----------------------------------------------------------------------
    //  This file is part of the Microsoft .NET Framework SDK Code Samples.
    //
    //  Copyright (C) Microsoft Corporation.  All rights reserved.
    //
    //This source code is intended only as a supplement to Microsoft
    //Development Tools and/or on-line documentation.  See these other
    //materials for detailed information regarding Microsoft code samples.
    //
    //THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
    //KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    //IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
    //PARTICULAR PURPOSE.
    //-----------------------------------------------------------------------

    using System;
    using System.DirectoryServices;
    using System.Security.Permissions;
    using System.Runtime.InteropServices;

    namespace Microsoft.Samples
    {  
        public sealed class ADRead
        {
            private ADRead() {}

            public static void Main(String[] args)
            {
                if(args.Length!=1)
                {
                    Console.WriteLine("Usage: " + Environment.GetCommandLineArgs()[0] + " <ad_path>");
                    Console.WriteLine ();
                    Console.WriteLine ("Press Enter to continue...");
                    Console.ReadLine();
                    return;
                }

                DirectoryEntry objDirEnt=new DirectoryEntry(args[0]);
                Console.WriteLine("Name            = " + objDirEnt.Name);
                Console.WriteLine("Path            = " + objDirEnt.Path);
                Console.WriteLine("SchemaClassName = " + objDirEnt.SchemaClassName);
                Console.WriteLine("");
                Console.WriteLine("Properties:");

                foreach(String Key in objDirEnt.Properties.PropertyNames)
                {
                    Console.Write("\t{0} = ", Key);
                    Console.WriteLine("");
                    foreach(Object objValue in objDirEnt.Properties[Key])
                    {
                        Console.WriteLine("\t\t{0}", objValue);
                    }
                }
            }
        }
    }
    크리에이티브 커먼즈 라이선스
    Creative Commons License

    'Microsoft > SPS/MOSS' 카테고리의 다른 글

    MOSS Form based authentication  (0) 2007/09/07
    Active directory how to  (0) 2007/09/06
    Active Directory ㅠ_ㅠ  (0) 2007/09/06
    MOSS 테크넷  (0) 2007/09/05
    Active directory 제어  (0) 2007/09/05
    MOSS Custom 검색을 위한 Webpart를 만들기 위한 예제 코드  (0) 2007/09/01
    올블로그추천버튼 블코추천버튼 블로그뉴스추천버튼 믹시추천버튼 한RSS추가버튼 구글리더기추천버튼


    이 포스팅이 도움이 되었다면 구글에서 관련 정보를 찾아 보세요 ^^


    Trackback 0 Comment 0

    Trackback : http://i-ruru.com/trackback/160 관련글 쓰기

    2007/09/05 16:04

    Active directory 제어

    http://msdn.microsoft.com/library/kor/default.asp?url=/library/KOR/vbcon/html/vbwlkwalkthroughcreatingadsiobjects.asp


    MOSS.. 아 짜증.. Active directory를 코딩으로 제어해야한다.. 된장..
    크리에이티브 커먼즈 라이선스
    Creative Commons License

    'Microsoft > SPS/MOSS' 카테고리의 다른 글

    Active Directory ㅠ_ㅠ  (0) 2007/09/06
    MOSS 테크넷  (0) 2007/09/05
    Active directory 제어  (0) 2007/09/05
    MOSS Custom 검색을 위한 Webpart를 만들기 위한 예제 코드  (0) 2007/09/01
    MOSS SharePoint Server 2007 SDK  (0) 2007/08/30
    MOSS SmartPart  (0) 2007/08/28
    올블로그추천버튼 블코추천버튼 블로그뉴스추천버튼 믹시추천버튼 한RSS추가버튼 구글리더기추천버튼


    이 포스팅이 도움이 되었다면 구글에서 관련 정보를 찾아 보세요 ^^


    Trackback 0 Comment 0

    Trackback : http://i-ruru.com/trackback/158 관련글 쓰기