Hello
I've got this line in my script
new-aduser -name $cn -GivenName $firstname -Surname $lastName -UserPrincipalName $upn`
-SamAccountName $sam -ProfilePath
$profilePath`
-AccountPassword(ConvertTo-SecureString"$password" -AsPlainText -force)`
-Enabled $True` followed by a few more attributes.
When all the attributes are in the same line with new-aduser cmdlet then there is no problem but if I try to make thenew-aduser and its parameters look like a paragraph using backticks ` (as shown above) then none of the attributes are recognized as the names of the cmdlet. At least that's the error it throws. Does anyone know how can I achieve this?
I just want my script to look nice.
Thank you