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