troubleshooting Question

Creating accounts AD 2k8 PowerShell - Carriage Return in addresses

Avatar of Fred Acme
Fred Acme asked on
Microsoft OfficeMicrosoft ExcelActive DirectoryPowershell
5 Comments1 Solution248 ViewsLast Modified:

How are you today ?

I've got a problem with Excel, PowerShell and AD (2008 or 2012).
In AD, we have some users with an address on 2 lines (See 2-LINES.JPG attached).

In Excel, I use ALT+ENTER (or "Wrap up automatically" button) to make the return (See 2-LINES-EXCEL.JPG).

Then, I save the file in csv with  coma format.

When I lauch my script (this is a part of the script) : New-ADUser -StreetAddress $_.streetaddress
The address is on a signle line.

What should I do to make the address on two lines ?

Thank you for your help !

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros