WEBVTT

00:00.450 --> 00:07.560
One of the most common Bauld revision and techniques used to really change management shell makes use

00:07.560 --> 00:08.870
of comma separated.

00:08.880 --> 00:16.530
Well who says the files these files act in a similar way to a database table each record in the table

00:16.530 --> 00:25.530
is represented by one line in the file and each field is separated by a comma which is used to other

00:25.530 --> 00:26.590
delimiter.

00:26.610 --> 00:32.790
And this video you'll learn how to set up a separate file and create recipients.

00:32.930 --> 00:37.740
Imbolc use in the change management shell to follow along.

00:37.740 --> 00:45.900
In addition to the change management shell or IAC you'll need to use Microsoft Excel to create a CSP

00:45.900 --> 00:46.570
file.

00:46.680 --> 00:54.330
You have to create some mailboxes and ball you enter or some data in Excel and will include the settings

00:54.360 --> 00:56.990
for 5 new mailboxes.

00:57.000 --> 01:05.040
Will have to create name Elyas user principal name and organizational unit for these users.

01:05.070 --> 01:13.200
Then go to File Save As and select see 3 or comma delimited for the file type.

01:13.320 --> 01:21.990
I'll save the file as mailboxes one dad says we really on the vitiated management shell create a secure

01:22.180 --> 01:29.940
password or object to be used as an individual password for each mailbox.

01:29.940 --> 01:37.940
So please greet pass wearable which equals to convert to secure stream as plaintext.

01:37.980 --> 01:41.370
Your password here and force perimeter.

01:41.490 --> 01:45.990
Then import the sales file and create the mailboxes.

01:45.990 --> 01:48.330
You can do this with the following command.

01:48.510 --> 01:50.010
Import CSP.

01:50.160 --> 01:55.200
The past to your file and pipe it to 4 recharger.

01:55.320 --> 02:00.280
So for each user will perform the following operation.

02:00.330 --> 02:09.000
New mail box is the name which will be taken from the Name field LS which will be taken from LS field

02:09.210 --> 02:18.030
user principle name organizational unit passport which will be taken from the wearable which you had

02:18.030 --> 02:25.020
created before and reset password the next logged on which will be set to true.

02:25.140 --> 02:32.850
So in this example with imported this is the file into the shell and pipe to that information to the

02:33.090 --> 02:42.060
foreach object command let use an assumed character Ls for each record in the this for your file.

02:42.210 --> 02:50.370
They are running the new mailbox command let rewired and well you know the name alias on principle name

02:50.600 --> 02:53.350
and organizational unit parameters.

02:53.430 --> 03:00.930
The properties for each record can be accessed inside the loop inside the dollar underscore variable

03:01.170 --> 03:07.290
which is the automatic variable that references the current object in the pipeline.

03:07.440 --> 03:15.720
You can also use PSII term wearable which is the same for Dolor underscore and was introduced a bit

03:15.720 --> 03:18.150
later in power shell.

03:18.150 --> 03:25.050
So this variable is the automatic variable that references the current object in the pipeline.

03:25.050 --> 03:33.300
The property names for each record match the header names use teensiest the files as we created each

03:33.300 --> 03:34.200
mailbox.

03:34.230 --> 03:42.570
The passport is set to the boss wearable ambil the recent passport on next log on parameter is set to

03:42.570 --> 03:50.910
true which will require each user to reset their password after their first loggy him.

03:50.910 --> 03:58.280
Using this technique you can literally recreate thousands of mailboxes in a matter of minutes.

03:58.290 --> 04:06.430
This concept can also be applied to all the recipient types such as distribution groups and contacts.

04:06.450 --> 04:14.280
You just need to specify the appropriate parameter wealthiest in the CC file and to use the respondent

04:14.280 --> 04:16.720
come on the left for the recipient site.

04:16.800 --> 04:25.680
For example if you want a bald provision contacts from a sensory file using code from the previous example

04:25.680 --> 04:33.930
as a guide and instead of using the new mailbox command let use their new mail contact Command lead

04:34.020 --> 04:38.700
and whatever parameters are required based on your settings.

04:38.700 --> 04:43.880
Now let's take a look into an alternative approach to the previous example.

04:43.980 --> 04:51.750
Let's say that you don't want to set an initial password for each user and instead you want to include

04:51.750 --> 04:58.910
this information in the CSP file so that each new mailbox gets a unique password.

04:58.920 --> 05:04.340
Again you'll need a top three file which will be really required.

05:04.380 --> 05:12.970
Well for example your office free file would look like something like that name field alias your principal

05:12.970 --> 05:16.020
name and Basford field.

05:16.160 --> 05:23.510
Note that in the previous example we are using different column names for this new file.

05:23.530 --> 05:31.210
We've removed the organizational unit column and now Kara Basford column that will be used to create

05:31.270 --> 05:33.980
each mailbox with a unique password.

05:34.090 --> 05:42.400
After you are Dom create the file save it again as mailboxes do Dot says read in for examples Grip's

05:42.550 --> 05:43.400
folder.

05:43.490 --> 05:52.060
Next you can use the following code to create the mailboxes set the path and file name to the CAC file

05:52.060 --> 05:54.630
created in the previous step.

05:54.730 --> 06:03.320
You could type imports Sears Fisi call on backslash script mailboxes to that says field and pipe it

06:03.320 --> 06:10.810
to for rich Calment where you'll be specifying the boss for at risk for parameter.

06:10.930 --> 06:18.670
Then you be using a new mailbox again as we loop through each record and since we file we create a secure

06:18.670 --> 06:23.650
password object then can be used with a password parameter.

06:23.650 --> 06:31.260
The main difference in this case compared to the previous example is that each user gets a unique password

06:31.510 --> 06:37.400
and they do not need to reset their password the first time they log on.

06:37.450 --> 06:45.730
Now when provisioning recipients you'll probably need to do multiple things such as search active directory

06:45.820 --> 06:50.340
attributes and configure distribution group membership.

06:50.470 --> 06:54.170
Let's take our previous example a step further.

06:54.220 --> 06:58.430
Please take a look at the following code where we import cells.

06:58.440 --> 07:08.170
We then create a new mailbox for each object with first name last name alias user principle etc parameters

07:08.460 --> 07:10.800
and then search to use our identity.

07:10.940 --> 07:13.120
So you state or Brahmin's.

07:13.120 --> 07:14.870
Title and department.

07:15.010 --> 07:17.140
After that distribution.

07:17.140 --> 07:27.630
Group member with identity and member parameters and aid distribution group member for identity marketing

07:27.680 --> 07:30.010
and to for each member.

07:30.010 --> 07:37.820
Here in this example we are still using s.c.s free file but as we look through each record we are going

07:37.830 --> 07:45.280
in multiple command lots to first grade the mailbox set some of the active directory attributes and

07:45.280 --> 07:54.100
them at the mailbox to two separate distribution groups in order to use this code.

07:54.250 --> 08:02.130
We could just need to create a file that has columns for all of the well use your set him.

08:02.200 --> 08:11.020
Now that we have this framework in place we can add as many columns as and to the CC file and can call

08:11.290 --> 08:12.410
any number of.

08:12.410 --> 08:13.090
Come on lads.

08:13.090 --> 08:15.640
For each record in the sense we.
