Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Adding Users to AD

$
0
0

I am new to PowerShell and was browsing for a script to use for fun and to understand scripting. I stumbled uponCraigSCCM's script, and I had some questions about it before trying it. His script is as follows;

$users=Import-CSVC:\users.csv
$users|foreach-object{
$Password=convertto-securestring$_.password-asplaintext-force
new-mailbox-name$_.name-alias$_.alias-FirstName$_.Firstname-LastName$_.Lastname-userPrincipalName$_.UPN-database$_.Database-OrganizationalUnit$_.OUpath-Password$PasswordResetPasswordOnNextLogon:$true
}

His csv fields are as follows as well;

Alias, first name, last name, name, UPN, OUpatch, database and password

I understand some of the fields, but my questions are as follows.

Why have an alias field?

Is the UPN field meant for pre windows 2000 or just email?

The OU patch has totemic.local/NO GROUP...


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>