Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Using PowerShell to populate City and State attributes from existing field with concatenate

$
0
0

I'm probably overthinking this issue, but I'm a SQL guy, not a powershell guy.

We have several users who's office location was populated in the "Office" field of AD.  (physicalDeliveryOfficeName)

SOME users have the correct info (i.e.: Corporate, or Building C) while others have the city state.

I can get the users I want to change with -Filter {physicalDeliveryOfficeName -like "*,*"}, but how do I copy those users' info from that field to the actual city and state fields?  (Stripping the comma, and separating the city/state)

Thank you


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>