1
00:00:02,618 --> 00:00:05,508
Let's now go to the lab and go on a demo

2
00:00:05,508 --> 00:00:07,285
on how to install the SharePoint Online

3
00:00:07,285 --> 00:00:09,411
PowerShell module, as well as connect to

4
00:00:09,411 --> 00:00:13,693
SharePoint Online using PowerShell. We are

5
00:00:13,693 --> 00:00:15,987
now in the lab environment and I have

6
00:00:15,987 --> 00:00:18,963
opened the PowerShell Gallery in here,

7
00:00:18,963 --> 00:00:21,824
which remember is the central repository

8
00:00:21,824 --> 00:00:24,759
for sharing and acquiring partial code

9
00:00:24,759 --> 00:00:28,571
including modules, scripts, and DSC

10
00:00:28,571 --> 00:00:31,380
resources. So let me search for SharePoint

11
00:00:31,380 --> 00:00:34,384
Online here in the search bar, and I will

12
00:00:34,384 --> 00:00:36,968
have two options. One of them is the

13
00:00:36,968 --> 00:00:40,817
Microsoft.Online .SharePoint .PowerShell.

14
00:00:40,817 --> 00:00:43,245
We're going to talk about the PnP 1 in

15
00:00:43,245 --> 00:00:45,758
just a few minutes, but for now let's

16
00:00:45,758 --> 00:00:49,151
focus on this one, the official Microsoft

17
00:00:49,151 --> 00:00:52,667
one. As you can see, the PowerShell

18
00:00:52,667 --> 00:00:54,756
Gallery makes it super easy for us. It

19
00:00:54,756 --> 00:00:57,588
even gives us the command that we can copy

20
00:00:57,588 --> 00:01:00,864
in order to get it installed. So let me

21
00:01:00,864 --> 00:01:03,579
copy this and I will go into the

22
00:01:03,579 --> 00:01:05,682
PowerShell window here that I have opened

23
00:01:05,682 --> 00:01:08,515
as an administrator, which opening it as

24
00:01:08,515 --> 00:01:13,138
an admin is very important to get modules

25
00:01:13,138 --> 00:01:16,251
installed. So let me click on Enter. It

26
00:01:16,251 --> 00:01:19,448
might ask you if you trust the PowerShell

27
00:01:19,448 --> 00:01:23,602
Gallery repository or not. If it asks you,

28
00:01:23,602 --> 00:01:27,204
just say Yes or Yes to All. If it is the

29
00:01:27,204 --> 00:01:29,141
first time that you installed PowerShell

30
00:01:29,141 --> 00:01:33,201
Gallery modules on this computer, it might

31
00:01:33,201 --> 00:01:36,881
ask you to update certain internal modules

32
00:01:36,881 --> 00:01:39,946
like NuGet.com and out of the box, just

33
00:01:39,946 --> 00:01:42,135
update them as part of the procedure. If

34
00:01:42,135 --> 00:01:44,683
not, as you can see, it only took a few

35
00:01:44,683 --> 00:01:48,448
minutes and it's already done. Now let me

36
00:01:48,448 --> 00:01:50,868
clean this up. Let me first of all get my

37
00:01:50,868 --> 00:01:53,419
credentials so get equal, Get-Credential.

38
00:01:53,419 --> 00:01:57,499
Let me enter my username, which is vlad@

39
00:01:57,499 --> 00:02:00,931
globomantics.org. Let me enter my

40
00:02:00,931 --> 00:02:04,858
password, and click on OK. Remember that

41
00:02:04,858 --> 00:02:07,425
whatever you enter in that box, it will

42
00:02:07,425 --> 00:02:11,011
simply say yes, boss, I saved it. There is

43
00:02:11,011 --> 00:02:14,133
no actual validation done. When you do a

44
00:02:14,133 --> 00:02:15,641
Get-Credential, the credential validation

45
00:02:15,641 --> 00:02:18,851
is done is when we try to connect. Now

46
00:02:18,851 --> 00:02:21,351
let's connect, let's do

47
00:02:21,351 --> 00:02:24,682
Connect-SPOService, give it the URL, and

48
00:02:24,682 --> 00:02:27,168
remember this is the URL of the SharePoint

49
00:02:27,168 --> 00:02:31,512
Online admin center so I'll go here, and I

50
00:02:31,512 --> 00:02:35,270
will copy https:// globomantics.org -

51
00:02:35,270 --> 00:02:38,678
admin.sharepoint .com. It will always be

52
00:02:38,678 --> 00:02:43,571
in the format of https, tenant name, -

53
00:02:43,571 --> 00:02:46,421
admin.sharepoint .com, and then I will

54
00:02:46,421 --> 00:02:48,563
give in my credential cred over here, and

55
00:02:48,563 --> 00:02:53,361
if we don't see any red, it's a good sign.

56
00:02:53,361 --> 00:02:55,134
Perfect! So we have now connected, let's

57
00:02:55,134 --> 00:02:59,058
just do a Get-SPOSite to make sure that we

58
00:02:59,058 --> 00:03:00,878
can actually get things from SharePoint.

59
00:03:00,878 --> 00:03:03,089
It should take a few seconds to run,

60
00:03:03,089 --> 00:03:05,503
depending on how many sites you have, and

61
00:03:05,503 --> 00:03:08,808
as you can see, it returned me all of my

62
00:03:08,808 --> 00:03:11,745
sites, which means I can connect to

63
00:03:11,745 --> 00:03:14,545
SharePoint Online using PowerShell. This

64
00:03:14,545 --> 00:03:16,961
is it for this demo. We have looked at how

65
00:03:16,961 --> 00:03:18,721
to get the SharePoint Online PowerShell

66
00:03:18,721 --> 00:03:21,871
module, as well as how to connect to

67
00:03:21,871 --> 00:03:25,294
SharePoint Online by using PowerShell. Now

68
00:03:25,294 --> 00:03:27,243
let's go back to the slides and talk about

69
00:03:27,243 --> 00:03:30,310
another PowerShell module, which is the

70
00:03:30,310 --> 00:03:37,000
SharePoint and Office 365 Dev PnP PowerShell module.

