【发布时间】:2020-08-15 22:07:10
【问题描述】:
如何获取过去6个月内被禁用的AD用户以及dd/MM/yyyy格式为.CSV文件被禁用时的时间戳?
喜欢使用这个 Powershell https://docs.microsoft.com/en-us/powershell/module/addsadministration/get-aduser?view=win10-ps 吗?
$paramhash=@{
UsersOnly = $True
AccountDisabled = $True
SearchBase = "OU=Employees,DC=globomantics,dc=local"
}
Search-ADAccount @paramHash |
Get-ADuser -Properties Description,Department,Title,LastLogonDate,WhenChanged |
sort LastLogonDate |
Select Name,Department,Title,Description,WhenChanged,LastLogonDate,DistinguishedName |
out-gridview -title "Disabled Employees"
【问题讨论】:
标签: powershell active-directory azure-active-directory powershell-4.0 powershell-remoting