{"id":19055387,"url":"https://github.com/evotecit/sharepointessentials","last_synced_at":"2025-02-22T01:24:11.417Z","repository":{"id":207652427,"uuid":"705153613","full_name":"EvotecIT/SharePointEssentials","owner":"EvotecIT","description":"SharePointEssentials is a PowerShell module that covers my basic usage of SharePoint. My goal is to keep my SharePoint commands in it. So far the only thing it can do is to synchronize files from local folder to SharePoint Online.","archived":false,"fork":false,"pushed_at":"2024-06-18T07:37:04.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T21:06:13.049Z","etag":null,"topics":["pnp","powershell","sharepoint"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvotecIT.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"PrzemyslawKlys","custom":["https://paypal.me/PrzemyslawKlys"]}},"created_at":"2023-10-15T07:25:12.000Z","updated_at":"2024-06-18T07:36:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"810c6705-e168-42b2-aae5-094c4fb72e6c","html_url":"https://github.com/EvotecIT/SharePointEssentials","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"6c8792320cba423d15b9fa43c659d17bf8e515e4"},"previous_names":["evotecit/sharepointessentials"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvotecIT%2FSharePointEssentials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvotecIT%2FSharePointEssentials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvotecIT%2FSharePointEssentials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvotecIT%2FSharePointEssentials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvotecIT","download_url":"https://codeload.github.com/EvotecIT/SharePointEssentials/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240111662,"owners_count":19749520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pnp","powershell","sharepoint"],"created_at":"2024-11-08T23:44:40.539Z","updated_at":"2025-02-22T01:24:11.411Z","avatar_url":"https://github.com/EvotecIT.png","language":"PowerShell","readme":"﻿\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.powershellgallery.com/packages/SharePointEssentials\"\u003e\u003cimg src=\"https://img.shields.io/powershellgallery/v/SharePointEssentials.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.powershellgallery.com/packages/SharePointEssentials\"\u003e\u003cimg src=\"https://img.shields.io/powershellgallery/vpre/SharePointEssentials.svg?label=powershell%20gallery%20preview\u0026colorB=yellow\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/EvotecIT/SharePointEssentials\"\u003e\u003cimg src=\"https://img.shields.io/github/license/EvotecIT/SharePointEssentials.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.powershellgallery.com/packages/SharePointEssentials\"\u003e\u003cimg src=\"https://img.shields.io/powershellgallery/p/SharePointEssentials.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/EvotecIT/SharePointEssentials\"\u003e\u003cimg src=\"https://img.shields.io/github/languages/top/evotecit/SharePointEssentials.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/EvotecIT/SharePointEssentials\"\u003e\u003cimg src=\"https://img.shields.io/github/languages/code-size/evotecit/SharePointEssentials.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.powershellgallery.com/packages/SharePointEssentials\"\u003e\u003cimg src=\"https://img.shields.io/powershellgallery/dt/SharePointEssentials.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://twitter.com/PrzemyslawKlys\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/PrzemyslawKlys.svg?label=Twitter%20%40PrzemyslawKlys\u0026style=social\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://evotec.xyz/hub\"\u003e\u003cimg src=\"https://img.shields.io/badge/Blog-evotec.xyz-2A6496.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.linkedin.com/in/pklys\"\u003e\u003cimg src=\"https://img.shields.io/badge/LinkedIn-pklys-0077B5.svg?logo=LinkedIn\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# SharePointEssentials\nSharePointEssentials is a PowerShell module that covers my basic usage of SharePoint. My goal is to keep my SharePoint commands in it.\nSo far the only thing it can do is to synchronize files from local folder to SharePoint Online.\n\n### Installation\n\n```powershell\nInstall-Module SharePointEssentials -Force -Verbose\n```\n\n### Usage Synchronization\n\n#### Creating SharePoint Sites\n\n```powershell\nNew-SPOSite -Url \"https://site.sharepoint.com/sites/TheDashboard\" -Owner admin@microsoft.com -Title TRest -Template \"BLANKINTERNETCONTAINER#0\" -StorageQuota 50000\n```\n\n#### Permissions required\n\nFor this script to work, you need to have the following permissions on the application (as a minimum):\n\n- Sharepoint / Sites.Selected\n- Microsoft Graph / Sites.Selected\n\nOf course you could run around with full control over all sites but that is not recommended.\n\n#### Permissions assigned\n\nOnce you created application with minimal permissions you need to choose which sites should be covered under it.\n\n```powershell\n$ClientID = '438511c4' # Temp SharePoint App\n$Url = 'https://site.sharepoint.com/sites/TheDashboard'\n\n# Lets connect to SharePoint Online\nConnect-PnPOnline -Url $Url -Interactive\n#First create a Read or Write permission entry for the app to the site. Currently unable to Set as FullControl\n$WritePermissions = Grant-PnPAzureADAppSitePermission -Permissions \"Write\" -Site $Url -AppId $ClientID -DisplayName \"Temp SharePoint App\"\n# Get the Permission ID for the app using App Id\n$PermissionId = Get-PnPAzureADAppSitePermission -AppIdentity $ClientID\n# Change the newly created Read/Write app site permission entry to FullControl\nSet-PnPAzureADAppSitePermission -Site $Url -PermissionId $(($PermissionId).Id) -Permissions \"FullControl\"\n```\n\n#### Verify that it worked\n\nLets verify things worked as expected. You can do it by running the following command:\n\n```powershell\n$ClientID = '438511c4' # Temp SharePoint App\n$TenantID = 'ceb371f6'\n\n#Connect-PnPOnline -Url $Url -ClientId $ClientID -ClientSecret $ClientSecret\nConnect-PnPOnline -Url $Url -ClientId $ClientID -Thumbprint '2EC' -Tenant $TenantID\n\n$FolderSiteRelativeUrl = \"/Shared Documents\" #Folder's Site Relative Path\n$FolderItems = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeUrl -ItemType File -Recursive\n$FolderItems | Format-Table\n```\n\n#### Example\n\nIf everything works you can run the following command to synchronize files from local folder to SharePoint Online.\n\n```powershell\n$Url = 'https://site.sharepoint.com/sites/SharePointEssentials'\n$ClientID = '438511c4' # Temp SharePoint App\n$TenantID = 'ceb371f6'\n\n# Using certificate is not only recommended but required for this script to work, it seems ClientSecret is not working\nConnect-PnPOnline -Url $Url -ClientId $ClientID -Thumbprint 'dfdfdf' -Tenant $TenantID\n\n$SyncFiles = @{\n    SiteURL           = 'https://site.sharepoint.com/sites/SharePointEssentials'\n    SourceFolderPath  = \"C:\\Support\\GitHub\\SharePointEssentials\\Examples\\Reports\"\n    TargetLibraryName = \"Shared Documents\"\n    LogPath           = \"$PSScriptRoot\\Logs\\Sync-FilesToSharePoint-$($(Get-Date).ToString('yyyy-MM-dd_HH_mm_ss')).log\"\n    LogMaximum        = 5\n    #Include           = \"*.aspx\"\n}\n\nSync-FilesToSharePoint @SyncFiles -WhatIf\n```\n\n### Credits\n\n- Salaudeen Rajack - https://www.sharepointdiary.com/2020/07/sync-file-share-to-sharepoint-online-using-powershell.html","funding_links":["https://github.com/sponsors/PrzemyslawKlys","https://paypal.me/PrzemyslawKlys"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevotecit%2Fsharepointessentials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevotecit%2Fsharepointessentials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevotecit%2Fsharepointessentials/lists"}