Spread the word.

Share the link on social media.

Share
  • Facebook
Have an account? Sign In Now

Sign Up

Create your WindowsTechno Community account. It’s free and only takes a minute.

Have an account? Sign In
Continue with Facebook
Continue with Google
or use

Have an account? Sign In Now

Sign In

Continue with Facebook
Continue with Google
or use

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Continue with Facebook
Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

WindowsTechno Community

WindowsTechno Community Logo WindowsTechno Community Logo

WindowsTechno Community Navigation

  • Home
  • About Us
  • Write For Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Write For Us
Home/ Questions/Q 1319
Next
Anonymous
  • 0
Anonymous
Asked: February 24, 20232023-02-24T00:01:57+05:30 2023-02-24T00:01:57+05:30In: Active Directory

Import-Module ActiveDirectory does not import all features?

  • 0

Hi there –

I’m having an issue referencing the primary email address of users in active directory. Specifically, I want to set the primary email address of a group of users as an alias (proxyAddresses). Here is what I have:

Set-ADUser -identity $user -Replace @{proxyAddresses= "SMTP:" + $user.EmailAddress}

The code runs, but the proxyaddresses field in Active Directory does not update properly. It only updates to “SMTP:”.

I could delete .emailAddress and simply have the following:

Set-ADUser -identity $user -Replace @{proxyAddresses= "SMTP:" + $user}

and it would update the proxy addresses to SMTP:username.

I could explicitly put the domain name like so:

Set-ADUser -identity $user -Replace @{proxyAddresses= "SMTP:" + $user + "@domain.com

And it would update the proxyaddress properly, but this isn’t ideal since we don’t really have a standardized email address. We have 7 different domains that any one of our employees could use as a primary email address. I want to automate this update a bit more.

All this to say: Powershell, for whatever reason, does not understand the .emailAddress property for $user.

Has anybody had this issue? Is there something I’m missing? I’ve enabled RSAT and the script includes “Import-Module ActiveDirectory.”

Edit: I’m so silly. I forgot to import the properties in Get-ADUser. I knew it was something simple. Thanks

 

 

  • 0 0 Answers
  • 23 Views
  • 0 Followers
  • 0
Share
  • Facebook

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Continue with Facebook
    Continue with Google
    or use

    Forgot Password?

    Need An Account, Sign Up Here
    Continue with Facebook
    Continue with Google

    Sidebar

    Ask A Question

    Stats

    • Questions : 119
    • Answers : 26
    • Posts : 15
    • Comment : 1
    • Best Answers : 4
    • Users : 8
    • Groups : 2
    • Group Posts : 0
    • Popular
    • Comments
    • Tags
    • Vipan Kumar

      DFSR no longer replicates files

      • 1 Comment
    • Vipan Kumar

      Wintel Administrator Interview Questions

      • 0 Comments
    • Vipan Kumar

      What is Active Directory?

      • 0 Comments
    • Vipan Kumar

      Active Directory Domain Services Overview

      • 0 Comments
    • Vipan Kumar

      How to fix the issue with the slow authentication

      • 0 Comments
    • Manoj
      Manoj added a comment Nice explanation ? February 4, 2023 at 11:21 am

    Users

    Shawn Davis

    Shawn Davis

    • 0 Questions
    • 0 Answers
    Manoj Kumar

    Manoj Kumar

    • 0 Questions
    • 0 Answers
    Vipan Thakur

    Vipan Thakur

    • 0 Questions
    • 0 Answers

    Explore

    • Home
    • Questions

    Footer

    © 2023 WindowsTechno. All Rights Reserved
    by WindowsTechno.