LoginSignup
0
0

More than 1 year has passed since last update.

Get-ADUserでアカウントの有効を確認したい

Posted at

概要

ActiveDirectoryの環境でアカウントの有効を確認したい。
Get-ADUserコマンドで確認を行う。

環境

  • Windows 10 Enterprise 20H2
  • PowerShell 5.1
  • ActiveDirectory、WSUS環境

RSATインストール

Windows10 1809以降でのRSATインストール方法(WSUS環境でのエラー解決方法も)
こちらのサイトを参考に、「RSAT:Active Directory Certificate Services Tools」をインストール。
また、WSUS環境であったため、上記ページの後半の内容も行いました。

メールアドレス指定でユーザの情報を取得する

Get-ADUser -Filter {EmailAddress -eq "aaa@example.com"}

ユーザ情報からEnabledだけを取得する

Get-ADUser -Filter {EmailAddress -eq "aaa@example.com"} | Select -Expand Enabled

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0