你好,
非常感谢你的提问。
针对你遇到的这个问题,“get-aduser” 命令后面的参数-identity接收到一个空的变量赋值。
也就是说上述命令中的$user你并没有给他赋值,他是一个空的变量,所以导致您出现的这个问题。
如果你想要查找特定用户的passwordlastset属性,可以使用以下的命令来实现。
$user="usersamaccountnamer"
Get-ADUser $user -Properties * | select passwordlastset
如果想要得到域中所有用户的passwordlastset属性,可以使用以下命令
Get-ADUser -Filter * -Properties * | select name, passwordlastset
关于这个“get-aduser”命令的使用帮助说明,请参考以下链接:
https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduser?view=winserver2012-ps
最好的祝福,
Lee
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com.