IT Knowledge Base

~ Without sacrifice, there can be no victory ~

發佈日期:

如何利用PowerShell指令‧啟用/停用AD帳戶

01. 一般大定會在Remote Server Administration Tools (RSAT) GUI界面中,啟用/停用AD帳戶。

02. 但有次發現,在GUI界面中,啟用/停用AD帳戶後,實際對AD帳戶一點作用也沒有。\

03. 所以有時會用到PowerShell,直接對AD帳戶作出啟用/停用動作。

04. 啟用AD帳戶。

Enable-ADAccount -Identity <user_logon_name>

05. 停用AD帳戶。

Disable-ADAccount -Identity <user_logon_name>

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *