none
dsget failed:Directory object not found.

    问题

  • Dear All,

    I occured a issue when I want to dsget user`s email. I cannot found all of user emial property, the power shell prompt me dsget failed:Directory object not found.

    I use the commad as below:

    dsquery user "ou=,ou=,ou=,ou=,dc=,dc=net" | dsget user -email

    and I can use dsquery user "ou=,ou=,ou=,ou=,dc=,dc=net" command to display all users but when I use dsget to find user`s email property, just display some user`s email, other user`s email doesn`t display and prompt me "dsget failed:Directory object not found."

    I don`t know why.

    Please help me.

    2016年6月28日 2:55

答案

  • Hi,

    Thanks for your post.

    You could use PowerShell to Obtain User's Email Attribute:

    Get-ADUser <user> -Properties mail | Select-Object -ExpandProperty mail

    You could also use:

    (Get-ADUser <user> -properties mail).mail

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    2016年6月28日 7:03
    版主