One of the most common Bauld revision and techniques used to really change management shell makes use
of comma separated.
Well who says the files these files act in a similar way to a database table each record in the table
is represented by one line in the file and each field is separated by a comma which is used to other
delimiter.
And this video you'll learn how to set up a separate file and create recipients.
Imbolc use in the change management shell to follow along.
In addition to the change management shell or IAC you'll need to use Microsoft Excel to create a CSP
file.
You have to create some mailboxes and ball you enter or some data in Excel and will include the settings
for 5 new mailboxes.
Will have to create name Elyas user principal name and organizational unit for these users.
Then go to File Save As and select see 3 or comma delimited for the file type.
I'll save the file as mailboxes one dad says we really on the vitiated management shell create a secure
password or object to be used as an individual password for each mailbox.
So please greet pass wearable which equals to convert to secure stream as plaintext.
Your password here and force perimeter.
Then import the sales file and create the mailboxes.
You can do this with the following command.
Import CSP.
The past to your file and pipe it to 4 recharger.
So for each user will perform the following operation.
New mail box is the name which will be taken from the Name field LS which will be taken from LS field
user principle name organizational unit passport which will be taken from the wearable which you had
created before and reset password the next logged on which will be set to true.
So in this example with imported this is the file into the shell and pipe to that information to the
foreach object command let use an assumed character Ls for each record in the this for your file.
They are running the new mailbox command let rewired and well you know the name alias on principle name
and organizational unit parameters.
The properties for each record can be accessed inside the loop inside the dollar underscore variable
which is the automatic variable that references the current object in the pipeline.
You can also use PSII term wearable which is the same for Dolor underscore and was introduced a bit
later in power shell.
So this variable is the automatic variable that references the current object in the pipeline.
The property names for each record match the header names use teensiest the files as we created each
mailbox.
The passport is set to the boss wearable ambil the recent passport on next log on parameter is set to
true which will require each user to reset their password after their first loggy him.
Using this technique you can literally recreate thousands of mailboxes in a matter of minutes.
This concept can also be applied to all the recipient types such as distribution groups and contacts.
You just need to specify the appropriate parameter wealthiest in the CC file and to use the respondent
come on the left for the recipient site.
For example if you want a bald provision contacts from a sensory file using code from the previous example
as a guide and instead of using the new mailbox command let use their new mail contact Command lead
and whatever parameters are required based on your settings.
Now let's take a look into an alternative approach to the previous example.
Let's say that you don't want to set an initial password for each user and instead you want to include
this information in the CSP file so that each new mailbox gets a unique password.
Again you'll need a top three file which will be really required.
Well for example your office free file would look like something like that name field alias your principal
name and Basford field.
Note that in the previous example we are using different column names for this new file.
We've removed the organizational unit column and now Kara Basford column that will be used to create
each mailbox with a unique password.
After you are Dom create the file save it again as mailboxes do Dot says read in for examples Grip's
folder.
Next you can use the following code to create the mailboxes set the path and file name to the CAC file
created in the previous step.
You could type imports Sears Fisi call on backslash script mailboxes to that says field and pipe it
to for rich Calment where you'll be specifying the boss for at risk for parameter.
Then you be using a new mailbox again as we loop through each record and since we file we create a secure
password object then can be used with a password parameter.
The main difference in this case compared to the previous example is that each user gets a unique password
and they do not need to reset their password the first time they log on.
Now when provisioning recipients you'll probably need to do multiple things such as search active directory
attributes and configure distribution group membership.
Let's take our previous example a step further.
Please take a look at the following code where we import cells.
We then create a new mailbox for each object with first name last name alias user principle etc parameters
and then search to use our identity.
So you state or Brahmin's.
Title and department.
After that distribution.
Group member with identity and member parameters and aid distribution group member for identity marketing
and to for each member.
Here in this example we are still using s.c.s free file but as we look through each record we are going
in multiple command lots to first grade the mailbox set some of the active directory attributes and
them at the mailbox to two separate distribution groups in order to use this code.
We could just need to create a file that has columns for all of the well use your set him.
Now that we have this framework in place we can add as many columns as and to the CC file and can call
any number of.
Come on lads.
For each record in the sense we.