Shunze 學園 (http://www.shunze.info/forum/index.php)
|- 電腦密技 (http://www.shunze.info/forum/board.php?boardid=5)
|-- 《分享》如何查出Windows 使用者帳號的安全識別碼 (http://www.shunze.info/forum/threadid.php?boardid=5&threadid=1675)


作者: shunze 發表時間: 2011-04-20, 19:29:

《分享》如何查出Windows 使用者帳號的安全識別碼

突然遇到這個問題,只能上Google找答案了...

網路上查到一個簡單好用的script,能夠快速解析出使用者帳號對應的安全識別碼。

Script內容如下:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set objAccount = objWMIService.Get _
("Win32_UserAccount.Name='使用者帳號',Domain='網域'")
Wscript.Echo objAccount.SID


使用者帳號就打入使用者名稱,例如:shunze,
網域就打入網域名稱;如果未加入網域,就輸入電腦名稱。
然後將這個script儲存為副檔名vbs的檔案,
執行它後,就可以查出該帳號的安全識別碼了∼

Powered by: Burning Board 1.1.1 2001 by WoltLab
Taiwan Translation by Achi