I have this command that works great it gets me what i need but i was wondering if it there is a way to break down the list of users. For example instead of having the users listed in one continuous string to be broken down like below
USer1
USer2
instead of like the below
User1;User2;User3
this is the script that im using
You’re getting the semicolon-separated list because of the Join() you’re doing. Also, I’m unclear why the ForEach is in there. It’s essentially just keeping the Name property, despite the work you just did with the other property.
Couldn’t you just select the two properties you want, and then pipe that to Export-CSV?
Try that. If it’s not producing what you need, definitely hop back here and explain what you’d like to change, and I’ll try and help. And more importantly, make sure you understand WHY this command is doing what it does. If you don’t, ask - happy to explain whatever pieces you need. That’s a lot more important than it just working.
Thank you, this pulled the same info had in the previous command.
my main thing im trying to do is pull an easy to read report for an exec that doesnt like the list of users being in one strand.
So im trying to get a output to show each User on a separate line ill try to explain in the example below.
DL NAme Name
DL-all Users User 1
User 2
User4
DL-Main Office User6
User 7
If it out outs the DL Name every time that is ok as well.
Ive sent them the output i had before with users (LastName, FirstName) but only separated by a ; and they didn’t like that.
I hope this clears it up a little bit.
Basically the end goal is to get an easy to read list of all the DL’s and who is allowed to send to them.