So I have my CSV file that I am importing to create new AD users, and I’m trying to concatenate the -name attribute value so it’s in the format below.
lastname, firstname
<code>... | New-ADUser -name '($_."surname"), ($_."givenname")'
I know what I have here is wrong. I’ve tried many different variations, all no good. Can anyone help? Thanks in advance!
If the -Name parameter allows pipeline binding by property name then you can do this:
If that parameter doesn’t support pipeline binding then try this: