Bilgisayar Hesabı Yaratmak
Ocak 3, 2008 at 7:59 pm | In Windows Server 2000/2003 | Leave a CommentTags: active directory, domain, etki alanı, gökhan şenyüz, komut satırı, script, user account, vbscript, windows server 2003
|
PROBLEM: Bir bilgisayar hesabı yaratmak istiyorsunuz.
ÇÖZÜM: 1- Grafik Arabirim kullanarak - Active Directory Users and Computer konsolunu açın. - Computer klasörüne sap tıklayın New—Computer komutunu verin. - Bilgisayar adını girin ve OK butonuna basın. 2- Komut Satırı kullanarak Dsadd computer “” –desc “” 3- VBScript kullanarak ‘ This code creates a computer object. ‘ —— SCRIPT CONFIGURATION —— strBase = ” ” ‘ e.g. cn=Computers,dc=rallencorp,dc=com strComp = “” ‘ e.g. joe-xp strDescr = “” ‘ e.g. Joe’s Windows XP workstation ‘ —— END CONFIGURATION ——— ‘ ADS_USER_FLAG_ENUM Const ADS_UF_WORKSTATION_TRUST_ACCOUNT = &h1000 set objCont = GetObject(“LDAP://” & strBase) set objComp = objCont.Create(“computer”, “cn=” & strComp) objComp.Put “sAMAccountName”, strComp & “$” objComp.Put “description”, strDesc objComp.Put “userAccountControl”, ADS_UF_WORKSTATION_TRUST_ACCOUNT objComp.SetInfo Wscript.Echo “Computer account for ” & strComp & ” created” |
Henüz Yorum Yok »
Bu yazıya yapılan yorumlar için RSS beslemeleri. URI'nin geri izlemesini yap.
Yorum yapın
WordPress.com'dan blog alın. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.