From 25f20e0b37e8c2484e05481c0b59983f09f69cc7 Mon Sep 17 00:00:00 2001 From: Todd Klindt Date: Mon, 25 Jan 2021 09:35:55 -0600 Subject: [PATCH] Update Add-PnPSiteCollectionAdmin.md Removed alias in example #3. Added bit about needing to be a site admin to run this command and added hint to use the tenant command if you're not. --- documentation/Add-PnPSiteCollectionAdmin.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/Add-PnPSiteCollectionAdmin.md b/documentation/Add-PnPSiteCollectionAdmin.md index de9300f97..f778f339e 100644 --- a/documentation/Add-PnPSiteCollectionAdmin.md +++ b/documentation/Add-PnPSiteCollectionAdmin.md @@ -21,7 +21,7 @@ Add-PnPSiteCollectionAdmin ``` ## DESCRIPTION -This command allows adding one to many users as site collection administrators to the site collection in the current context. It does not replace or remove existing site collection administrators. +This command allows adding one to many users as site collection administrators to the site collection in the current context. It does not replace or remove existing site collection administrators. You must be a Site Collection Admin to run this command. Use `Set-PnPTenantSite -Owners` if you are not an Admin for the site but have the SharePoint admin role. ## EXAMPLES @@ -41,7 +41,7 @@ This will add user1@contoso.onmicrosoft.com and user2@contoso.onmicrosoft.com as ### EXAMPLE 3 ```powershell -Get-PnPUser | ? Title -Like "*Doe" | Add-PnPSiteCollectionAdmin +Get-PnPUser | Where-Object Title -Like "*Doe" | Add-PnPSiteCollectionAdmin ``` This will add all users with their title ending with "Doe" as additional site collection owners to the site collection in the current context @@ -78,4 +78,4 @@ Accept wildcard characters: False ## RELATED LINKS -[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) \ No newline at end of file +[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)