1
00:00:02,380 --> 00:00:04,290
Now that we have seen the theory, let's go

2
00:00:04,290 --> 00:00:07,800
to the lab and see how we can delete sites

3
00:00:07,800 --> 00:00:10,610
from SharePoint Online. We're now in the

4
00:00:10,610 --> 00:00:13,370
live environment, so let me open up first

5
00:00:13,370 --> 00:00:16,370
the admin center, and I'm already in the

6
00:00:16,370 --> 00:00:19,840
Active sites page. Let's pick on the site

7
00:00:19,840 --> 00:00:22,510
that we had created earlier in this

8
00:00:22,510 --> 00:00:25,560
module, Comm Site With the UI. And if we

9
00:00:25,560 --> 00:00:28,440
want to delete it, we simply click on

10
00:00:28,440 --> 00:00:31,850
Delete over here. And we have a warning

11
00:00:31,850 --> 00:00:34,770
that if you delete this site, users won't

12
00:00:34,770 --> 00:00:38,030
be able to access it, and you have 93 days

13
00:00:38,030 --> 00:00:40,170
to restore the site before it's

14
00:00:40,170 --> 00:00:42,920
permanently deleted. I will click on

15
00:00:42,920 --> 00:00:46,350
Delete. It should only take a few seconds.

16
00:00:46,350 --> 00:00:49,590
And after that, you can view the deleted

17
00:00:49,590 --> 00:00:54,030
sites from the other tab under Sites. From

18
00:00:54,030 --> 00:00:56,960
here, from the Deleted sites, I can select

19
00:00:56,960 --> 00:00:59,910
it, and I can either restore it or

20
00:00:59,910 --> 00:01:02,830
permanently delete it. Let's restore it

21
00:01:02,830 --> 00:01:04,640
for now, and we're going to do the

22
00:01:04,640 --> 00:01:08,100
permanent delete through PowerShell. Now,

23
00:01:08,100 --> 00:01:10,230
it should be back here, Comm Site With the

24
00:01:10,230 --> 00:01:13,540
UI. If I go to it, I should be able to

25
00:01:13,540 --> 00:01:15,660
access it right away because it's a small

26
00:01:15,660 --> 00:01:18,980
site, but of course, the bigger the site,

27
00:01:18,980 --> 00:01:21,280
the longer it will take to delete and

28
00:01:21,280 --> 00:01:24,160
restore them. Now, if we want to delete

29
00:01:24,160 --> 00:01:26,980
sites through PowerShell. So if you want

30
00:01:26,980 --> 00:01:31,790
to delete the site, we do remove SPOSite,

31
00:01:31,790 --> 00:01:34,390
give it the identity, and you see it

32
00:01:34,390 --> 00:01:37,800
actually asked me for a confirmation, and

33
00:01:37,800 --> 00:01:42,450
I will click Yes. If you want to not have

34
00:01:42,450 --> 00:01:44,530
that confirmation, we're going to cover

35
00:01:44,530 --> 00:01:47,370
that in a few seconds. But first of all,

36
00:01:47,370 --> 00:01:50,190
let's take a look at the Restore. Now that

37
00:01:50,190 --> 00:01:53,010
it's deleted, it should actually show up

38
00:01:53,010 --> 00:01:55,490
in Deleted sites over here again. We're

39
00:01:55,490 --> 00:01:58,440
gonna go and we're going to restore it.

40
00:01:58,440 --> 00:02:00,910
And now, if we want to not have that

41
00:02:00,910 --> 00:02:03,320
confirmation, let's say you want to delete

42
00:02:03,320 --> 00:02:06,120
quite a few sites at once, and you don't

43
00:02:06,120 --> 00:02:09,200
have to or need to confirm with each one,

44
00:02:09,200 --> 00:02:13,470
you can use the Confirm false parameter,

45
00:02:13,470 --> 00:02:15,950
and this will make sure that it will not

46
00:02:15,950 --> 00:02:18,450
ask you to do that confirmation. It should

47
00:02:18,450 --> 00:02:21,750
just remove the site. Again, remember, it

48
00:02:21,750 --> 00:02:24,340
will not ask you for that confirmation, so

49
00:02:24,340 --> 00:02:26,560
make sure you know what your script is

50
00:02:26,560 --> 00:02:28,990
doing so you don't accidentally delete

51
00:02:28,990 --> 00:02:31,460
things that you shouldn't. Now, if you

52
00:02:31,460 --> 00:02:34,840
want to remove it from the recycle bin as

53
00:02:34,840 --> 00:02:37,610
well. Why would we want to remove it from

54
00:02:37,610 --> 00:02:40,180
the recycle bin as well? It's because now

55
00:02:40,180 --> 00:02:44,000
that it's in the recycle bin, if I go into

56
00:02:44,000 --> 00:02:46,280
Active sites and let's say I try to create

57
00:02:46,280 --> 00:02:49,330
a site with the same URL, so let me go in

58
00:02:49,330 --> 00:02:52,780
to Create, let's going to Communication

59
00:02:52,780 --> 00:02:56,750
Site, I'll just do CommSiteWiththeUI, you

60
00:02:56,750 --> 00:03:00,420
see, it automatically adds a 2 at the end

61
00:03:00,420 --> 00:03:03,890
because it already exists. So because it's

62
00:03:03,890 --> 00:03:06,040
in the recycle bin, I cannot recreate a

63
00:03:06,040 --> 00:03:09,160
site with the same URL, so that might be a

64
00:03:09,160 --> 00:03:11,490
very good reason why you want to

65
00:03:11,490 --> 00:03:14,460
permanently remove it. So I'll do a

66
00:03:14,460 --> 00:03:18,540
Remove‑SPODeletedSite, it will ask me to

67
00:03:18,540 --> 00:03:21,160
confirm, I will say Yes, and now that site

68
00:03:21,160 --> 00:03:24,650
is permanently gone. You cannot restore it

69
00:03:24,650 --> 00:03:27,200
anymore. There are still ways to restore

70
00:03:27,200 --> 00:03:29,750
it if you go through Microsoft Support, so

71
00:03:29,750 --> 00:03:32,520
there might still be a way there, but not

72
00:03:32,520 --> 00:03:36,630
without Microsoft's help. This is it for

73
00:03:36,630 --> 00:03:39,390
this demo. We have looked at how to delete

74
00:03:39,390 --> 00:03:42,490
sites using both the user interface, as

75
00:03:42,490 --> 00:03:45,460
well as PowerShell. Now let's go back in

76
00:03:45,460 --> 00:03:51,000
the slides and talk about how to manage hub sites.

