Skip to content

Commit 9e0e571

Browse files
Merge pull request SharePoint#8010 from KoenZomers/patch-42
Update create-hub-site-with-powershell.md
2 parents 373f2a4 + 1155ba3 commit 9e0e571

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/features/hub-site/create-hub-site-with-powershell.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create SharePoint hub sites using PowerShell
33
description: Example code for creating a SharePoint hub site by using PowerShell.
4-
ms.date: 11/18/2020
4+
ms.date: 06/07/2022
55
ms.localizationpriority: high
66
---
77

@@ -17,7 +17,7 @@ If you're a global or SharePoint admin in Office 365, you can convert any existi
1717
1818
## Using PnP PowerShell
1919

20-
The samples below can be performed using [PnP PowerShell](https://www.powershellgallery.com/packages/SharePointPnPPowerShellOnline).
20+
The samples below can be performed using [PnP PowerShell](https://www.powershellgallery.com/packages/PnP.PowerShell).
2121

2222
> [!NOTE]
2323
> In the remainder of this exercise, **contoso** will be used as the tenant name. Continue to use your own tenant name in place of **contoso**.
@@ -34,7 +34,7 @@ First, we will create the marketing site that will serve as a hub site that othe
3434
Connect-PnPOnline -Url https://contoso-admin.sharepoint.com -UseWebLogin
3535
```
3636

37-
2. Create the site to be used as a hub site using the [New-PnPSite](/powershell/module/sharepoint-pnp/new-pnpsite) cmdlet:
37+
2. Create the site to be used as a hub site using the [New-PnPSite](https://pnp.github.io/powershell/cmdlets/New-PnPSite.html) cmdlet:
3838

3939
```powershell
4040
New-PnPSite -Type TeamSite -Title "Contoso marketing division" -Alias "marketing" -Description "Main site for collaboration for marketing teams at Contoso"
@@ -46,10 +46,10 @@ First, we will create the marketing site that will serve as a hub site that othe
4646
https://contoso.sharepoint.com/sites/marketing
4747
```
4848

49-
3. Register the new marketing site as a hub site by using the [Register-SPOHubSite](/powershell/module/sharepoint-online/register-spohubsite) cmdlet:
49+
3. Register the new marketing site as a hub site by using the [Register-PnPHubSite](https://pnp.github.io/powershell/cmdlets/Register-PnPHubSite.html) cmdlet:
5050

5151
```powershell
52-
Register-SPOHubSite -Site https://contoso.sharepoint.com/sites/marketing
52+
Register-PnPHubSite -Site https://contoso.sharepoint.com/sites/marketing
5353
```
5454

5555
## Set properties and permissions on the hub site
@@ -60,7 +60,7 @@ The hub site doesn't have a logo or description yet. We also want to constrain i
6060

6161
1. Upload a logo image for the site by going to `https://contoso.sharepoint.com/sites/marketing/SiteAssets` and uploading any image you like. Make a note of the image file name.
6262

63-
2. Use the [Set-PnPHubSite](/powershell/module/sharepoint-pnp/set-pnphubsite) cmdlet to set the logo and description. In place of `mylogo.jpg`, specify the name of the image that you uploaded:
63+
2. Use the [Set-PnPHubSite](https://pnp.github.io/powershell/cmdlets/Set-PnPHubSite.html) cmdlet to set the logo and description. In place of `mylogo.jpg`, specify the name of the image that you uploaded:
6464

6565
```powershell
6666
Set-PnPHubSite
@@ -73,7 +73,7 @@ The hub site doesn't have a logo or description yet. We also want to constrain i
7373

7474
Now we will restrict access so that only the user `[email protected]` can make changes to the hub site associations.
7575

76-
- Run the [Grant-PnPHubSiteRights](/powershell/module/sharepoint-pnp/grant-pnphubsiterights) cmdlet to grant a user rights to the marketing hub site. We'll use `nestorw@contoso` in this example, but you can use any valid user on your tenant (you can specify multiple users by separating them with a comma):
76+
- Run the [Grant-PnPHubSiteRights](https://pnp.github.io/powershell/cmdlets/Grant-PnPHubSiteRights.html) cmdlet to grant a user rights to the marketing hub site. We'll use `nestorw@contoso` in this example, but you can use any valid user on your tenant (you can specify multiple users by separating them with a comma):
7777

7878
```powershell
7979
Grant-PnPHubSiteRights -Identity https://contoso.sharepoint.com/sites/marketing -Principals "nestorw@contoso" -Rights Join
@@ -83,7 +83,7 @@ Now we will restrict access so that only the user `[email protected]` can make
8383

8484
The final step is to create the site we want to associate with the hub. You can repeat these steps for as many sites as you want to join to the hub.
8585

86-
1. Provision the site by using the [New-PnPSite](/powershell/module/sharepoint-pnp/new-pnpsite) cmdlet:
86+
1. Provision the site by using the [New-PnPSite](https://pnp.github.io/powershell/cmdlets/New-PnPSite.html) cmdlet:
8787

8888
```powershell
8989
New-PnPSite -Type TeamSite -Title "Online advertising team" -Alias "online-advertising" -Description "For collaboration on online advertising resources"
@@ -95,7 +95,7 @@ The final step is to create the site we want to associate with the hub. You can
9595
https://contoso.sharepoint.com/sites/online-advertising
9696
```
9797

98-
2. Associate this site with the hub site by using the [Add-PnPHubSiteAssociation](/powershell/module/sharepoint-pnp/add-pnphubsiteassociation) cmdlet:
98+
2. Associate this site with the hub site by using the [Add-PnPHubSiteAssociation](https://pnp.github.io/powershell/cmdlets/Add-PnPHubSiteAssociation.html) cmdlet:
9999

100100
```powershell
101101
Add-PnPHubSiteAssociation
@@ -107,7 +107,7 @@ The final step is to create the site we want to associate with the hub. You can
107107

108108
To confirm, you can either:
109109

110-
- Run the [Get-PnPHubSite](/powershell/module/sharepoint-pnp/get-pnphubsite) cmdlet.
110+
- Run the [Get-PnPHubSite](https://pnp.github.io/powershell/cmdlets/Get-PnPHubSite.html) cmdlet.
111111

112112
- Sign in to SharePoint Online and view the hub site directly at `https://contoso.sharepoint.com/sites/marketing`.
113113

0 commit comments

Comments
 (0)