I have to be doing something wrong here. I’m trying to update our Street Address via Powershell. The line break just isn’t updating in AD. I’m trying to update everyone in a particular OU.<\/p>\n
get-aduser -SearchBase \"OU=XXX-XXX,OU=XXX,OU=XXX,DC=Place,DC=Place,DC=local\" -Filter * | set-aduser -streetaddress \"Area 51'r'nSuite 220\"\n<\/code><\/pre>\n
Advertisement
I run that via Powershell and the line break never appears. Any help would be appreciated.<\/p>","upvoteCount":4,"answerCount":5,"datePublished":"2019-03-28T18:20:45.000Z","author":{"@type":"Person","name":"jefflilland2","url":"https://community.spiceworks.com/u/jefflilland2"},"acceptedAnswer":{"@type":"Answer","text":"
Advertisement
You are using the wrong symbols, it needs to be backtick ( ` ) (on the tilde key), and not a single quote ( ’ )<\/p>\n
set-aduser -streetaddress \"Area 51`r`nSuite 220\"\n<\/code><\/pre>","upvoteCount":0,"datePublished":"2019-03-28T18:23:32.000Z","url":"https://community.spiceworks.com/t/address-line-break/704716/2","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},"suggestedAnswer":[{"@type":"Answer","text":"I have to be doing something wrong here. I’m trying to update our Street Address via Powershell. The line break just isn’t updating in AD. I’m trying to update everyone in a particular OU.<\/p>\n
get-aduser -SearchBase \"OU=XXX-XXX,OU=XXX,OU=XXX,DC=Place,DC=Place,DC=local\" -Filter * | set-aduser -streetaddress \"Area 51'r'nSuite 220\"\n<\/code><\/pre>\nI run that via Powershell and the line break never appears. Any help would be appreciated.<\/p>","upvoteCount":4,"datePublished":"2019-03-28T18:20:45.000Z","url":"https://community.spiceworks.com/t/address-line-break/704716/1","author":{"@type":"Person","name":"jefflilland2","url":"https://community.spiceworks.com/u/jefflilland2"}},{"@type":"Answer","text":"
looks like you’re using this ’ when you should be using this `<\/p>\n
also, you could try using line breaks like this<\/p>\n
$streetaddress = \"first line\nsecond line\"\n<\/code><\/pre>\nor this<\/p>\n
$streetaddress = @\"\nline 1\nline 2\n\"@\n<\/code><\/pre>\nor from a file like:<\/p>\n
get-content c:\\path\\to\\streetaddress.txt\n<\/code><\/pre>","upvoteCount":1,"datePublished":"2019-03-28T18:23:58.000Z","url":"https://community.spiceworks.com/t/address-line-break/704716/3","author":{"@type":"Person","name":"anthonystringer","url":"https://community.spiceworks.com/u/anthonystringer"}},{"@type":"Answer","text":"