locked
Need help with removing properties RRS feed

  • Question

  • Greetings,

    We have discovered that one of our chat applications is able to write user data to Active Directory.  For example, a user logs into the chat program with their AD credentials, they load their profile page and enter their address, cell phone number, etc.  I have been tasked with creating  script that will wipe all of this data from their AD accounts, but it is not working in full.  Here is a copy of the scripting created thus far:

    Set-ADUser -Identity “test.acct”  -City “ “ -Country “ “ -HomePhone “ “ -MobilePhone “ “ -Office “ “ -OfficePhone “ “ -PostalCode “ “ -State “ “ -POBox “ “ -StreetAddress “ “ -Fax “ “  - Replace @{‘pager' = “ “} @{ipPhone=" "}


    (The Portion in Bold is where the script fails.)  Sometimes it will work, but only on one attribute, either Pager OR IpPhone, not both.  Can someone offer some insight as to what I am doing wrong?  It's been a while since I had to script via Active Directory Module for PowerShell, so it might be a simple fix.  Once it is running correctly on my test user, it will be expanded to include an entire OU.

    Server 2008 R2 Standard 64-Bit

    Tuesday, October 3, 2017 12:41 PM

Answers

  • -Clear pager,ipphone


    \_(ツ)_/

    • Marked as answer by Sarcasshole Tuesday, October 3, 2017 12:52 PM
    Tuesday, October 3, 2017 12:50 PM

All replies

  • -Clear pager,ipphone


    \_(ツ)_/

    • Marked as answer by Sarcasshole Tuesday, October 3, 2017 12:52 PM
    Tuesday, October 3, 2017 12:50 PM
  • Thank you!  I don't know why it was so hard to find an answer on that in any of the other forums...

    Your solution has been tested and confirmed.

    Tuesday, October 3, 2017 12:53 PM
  • help set-aduser -para clear

    help set-aduser -full

    That is because no one has any training in PowerShell.  Everyone just ask someone else for the answer.


    \_(ツ)_/

    Tuesday, October 3, 2017 12:56 PM