【发布时间】:2014-12-12 02:17:42
【问题描述】:
我在下面创建了 powershell 脚本。它工作正常,但我想让它返回用户的经理。似乎该对象已返回,但 search-adaccount 并未执行此操作。有人能帮忙吗?谢谢
$UserList = Search-ADAccount -AccountExpiring -UsersOnly -TimeSpan 07.00:00:00 | Select-Object name, AccountExpirationDate, LastLogonDate, UserPrincipalName
$ReportName = "C:\Users\administrator\desktop\ExpiringUsers-7DayReport.csv"
$UserList | Export-CSV $ReportName
【问题讨论】:
标签: powershell active-directory