国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

Active Directory 對象的控制

2024-07-21 02:24:14
字體:
來源:轉載
供稿:網友
方法一
ldifde.exe,用于批量導入和導出 active directory 對象。使用 ldifde 可以將新用戶記錄導入目錄,或將特定用戶的特定信息導出到一個文本文件中。ldifde 默認采用的是輸出模式(從目錄中讀取信息)。如果添加了 -i 選項,則還可以將更改寫入目錄(請參閱 microsoft 知識庫文章 q237677: using ldifde to import and export directory objects to the active directory,“使用 ldifde 向 active directory 中導入或從中導出目錄對象”)。另外,如果只想對特定 ou(組織單位)中的所有用戶導出和提取特定的細節,如用戶名、職務和登錄名,可以運行以下命令:
ldifde -f c:/ldif/exportusers.ldf –s servername -d "ou=yourouname,dc=yourdomainname,dc=com" -p subtree -r "(objectclass=user)" -l "cn,givenname,title,samaccountname"


方法二
使用vbs腳本自己編寫一個(如下)
'global variables
dim ocontainer
dim outputfile
dim filesystem

set filesystem = wscript.createobject("scripting.filesystemobject")
set outputfile = filesystem.createtextfile("asd.txt", true)  
 '輸出內容添加入文件名稱為asd.txt文件中

set ocontainer = getobject("winnt://billgates.")   ?。innt://為本機名稱  或 ldap為域名稱

enumerateusers(ocontainer)


outputfile.close
set filesystem = nothing
set ocontainer = nothing

wscript.echo "finished"                  '彈出對話框finish
wscript.quit(0)

sub enumerateusers(ocont)
dim ouser

for each ouser in ocont
select case lcase(ouser.class)
case "group"
if not isempty(ouser.name) then
outputfile.writeline "user: " & ouser.name     '顯示組名稱或用戶名稱
end if
if not isempty(ouser.class) then
outputfile.writeline "class: " & ouser.class    ?。э@示組類型或用戶類型
end if
if not isempty(ouser.member) then
outputfile.writeline "members: " & ouser.member  ?。э@示組成員
end if
end select

next
end sub


  • 網站運營seo文章大全
  • 提供全面的站長運營經驗及seo技術!
  • 發表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發表
    主站蜘蛛池模板: 桃源县| 双辽市| 山阴县| 新巴尔虎右旗| 石渠县| 牙克石市| 石城县| 靖江市| 南郑县| 陆丰市| 八宿县| 太原市| 论坛| 泸州市| 阿坝县| 闽清县| 淳安县| 扶风县| 吉水县| 察隅县| 浦东新区| 陕西省| 乃东县| 柳江县| 措美县| 菏泽市| 九龙坡区| 疏附县| 武邑县| 江山市| 湘乡市| 无棣县| 吴旗县| 信阳市| 金昌市| 永宁县| 永宁县| 屏山县| 拉萨市| 吉安县| 鄂温|