Remove X500 address from the TXT file

Welcome Forums General PowerShell Q&A Remove X500 address from the TXT file

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
1 year, 8 months ago.

  • Author
    Posts
  • #67686

    Participant
    Points: 0
    Rank: Member

    Hi,

    I need to remove just one X500 address from the users txt files , I had tries that script below did not work any help is appreciated

    Import-CSV d:\test_input.csv | foreach{Set-ADuser -identity $_.user -remove @{proxyAddresses = "x500:/o=ExchangeLabs/ou=Exchange Administrative Group /cn=Recipients/cn=@{user=$($_.user); legacy=$($_.legacy).legacy"}}

  • #68013

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    When you say it "doesn't work," can you be more specific? Any errors? Can you manually use PowerShell to remove the item from one user – to make sure you have the syntax correct?

  • #68040

    Participant
    Points: 0
    Rank: Member

    It don't give any error but also do not remove the X500 address , yes it work for single user .

The topic ‘Remove X500 address from the TXT file’ is closed to new replies.