SharePoint Online: View Folder Size using PowerShell

June 30, 2018    , , ,
Requirement: Get Folder Size in SharePoint Online How to C heck Folder Size in SharePoint Online? To view folder size in SharePoint Online, go to: Site Settings >> Click on "Storage Metrics" link under "Site Collection Administration" In the storage metrics page, Click on the document library to navigate to the location where the target folder is stored. The storage metrics page shows size of each folder and files (Including version history size). Please note the data shown in storage metrics page is not real time data! It takes a while for a background timer job to run and populate this data. SharePoint Online: Get Folder Size using PowerShell: Let's check folder size for all in a SharePoint Online site using PowerShell script. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common F
SharePoint Online: View Folder Size using PowerShell SharePoint Online: View Folder Size using PowerShell Reviewed by Salaudeen Rajack on June 30, 2018 Rating: 5

SharePoint Online: Find and Delete Duplicate List Items using PowerShell

June 23, 2018    , ,
Requirement: Find and Delete Duplicate Items in SharePoint Online list using PowerShell Find Duplicate Rows in a SharePoint Online List using PowerShell Let's find duplicate items in "Projects" list in SharePoint based on the column: ProjectName. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Parameters $SiteURL = "https://crescenttech.sharepoint.com" $ListName = "Projects" $UserName = "Salaudeen@CrescentTech.com" $Password = "Password" $SecurePassword= $Password | ConvertTo-SecureString -AsPlainText -Force #Setup the Context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.Share
SharePoint Online: Find and Delete Duplicate List Items using PowerShell SharePoint Online: Find and Delete Duplicate List Items using PowerShell Reviewed by Salaudeen Rajack on June 23, 2018 Rating: 5

SharePoint Online: Get-Set Choice Field Value using PowerShell

June 22, 2018    , ,
Requirement: Get / Set Choice Field Value in SharePoint Online Here is my PowerShell scripts collection to read and update choice column values in SharePoint Online. PowerShell to Get Choice Field Value from a List Item in SharePoint Online: #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Parameters $SiteURL = "https://crescenttech.sharepoint.com" $ListName ="Projects" $FieldName = "Project_x0020_Status" #Internal Name of the Field $ItemID = 10 #Get credentials to connect $Cred = Get-Credential Try { #Setup the Context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials
SharePoint Online: Get-Set Choice Field Value using PowerShell SharePoint Online: Get-Set Choice Field Value using PowerShell Reviewed by Salaudeen Rajack on June 22, 2018 Rating: 5

SharePoint Online: Create Managed Metadata Site Column using PowerShell

June 22, 2018    , , ,
Requirement: Create Managed Metadata Site Column in SharePoint Online using PowerShell How to Create a Managed Metadata Site Column in SharePoint Online? Managed Metadata column in SharePoint Online uses Term Set from the term store as the source for its allowed values. Term set defines set of values. E.g. Regions is a Term set and "Asia" is a Term. So when the term set "Regions" is used to as the source for a Managed Metadata site column, the term "Asia" can be its value. Here is how to add a managed metadata site column to SharePoint Online list. Browse to your SharePoint Online site and Navigate to the site settings >> Site Columns Click on "Create" link at the top of the page Provide the Name to your site column, specify the field type as "Managed Metadata" Scroll down and select the appropriate Term Set from the term store. Fill other optional values and Click on "OK" to create Managed Metadata site colum
SharePoint Online: Create Managed Metadata Site Column using PowerShell SharePoint Online: Create Managed Metadata Site Column using PowerShell Reviewed by Salaudeen Rajack on June 22, 2018 Rating: 5

SharePoint Online: Delete Permission Level using Powershell

June 18, 2018    , , , ,
Requirement: SharePoint Online Remove permission level using PowerShell Warning: Never delete any OOTB default permission levels in SharePoint! How to Delete Existing Permission Levels in SharePoint Online? To delete an existing permission level, in SharePoint Online, follow these steps: Navigate to SharePoint Online Site collection where you want the permission level to be deleted.  (Make sure you are in the root web!) Click on Settings gear >> Select Site Settings from the Settings menu. On the Site Settings page, Click on "Site Permissions" link under Users and Permissions section. On the Permissions page, Click on "Permission Levels" button from the Permissions tab of the ribbon.  On the Permission Levels page, Tick the check the box(es) for permission levels you want to delete, and click the "Delete Selected Permission Levels" link. Confirm the prompt with OK button. This deletes the permission level in SharePoint Online! Powe
SharePoint Online: Delete Permission Level using Powershell SharePoint Online: Delete Permission Level using Powershell Reviewed by Salaudeen Rajack on June 18, 2018 Rating: 5

SharePoint Online: How to Check Group Permissions in a Site?

June 18, 2018    , ,
Requirement: Check Group Permission in SharePoint Online. How to Check SharePoint Online Group Permissions? SharePoint groups may be granted permission anywhere in a site collection. Here is how to view a group's permission assignments: Login to your SharePoint Online site >> Click on Gear Icon >> Site Settings from the Settings menu. On the Site Settings page, Click on People and Groups link under Users and Permissions section. Click the name of the group in the left navigation. On the Groups page, Select the Settings >> View Group Permissions option The View Site Collection Permissions page appears; it displays the sites, lists, libraries, folders, files,etc where the group is assigned permissions and the permission levels associated with the group.
SharePoint Online: How to Check Group Permissions in a Site? SharePoint Online: How to Check Group Permissions in a Site? Reviewed by Salaudeen Rajack on June 18, 2018 Rating: 5

Limited-access user permission lockdown mode Feature in SharePoint

June 18, 2018    , , ,
What is limited-access user permission lockdown mode? In SharePoint, users are assigned to the "Limited Access" permission level automatically when the account is granted exclusive access (unique permission) only to resources such as list/library/document, etc within the site, but not directly to the site itself. E.g. When you grant access to a List in SharePoint, they'll be granted "Limited Access" permission at the site level.  When publishing a SharePoint site to the Internet, we need a mechanism for effectively locking down the SharePoint site. In this case, locking down SharePoint just means that users in a "limited access" role will be unable to access application pages, thus minimizing the attack surface on a SharePoint site. When this feature is enabled, users assigned to the Limited Access permission level will not have the ability to access pages within the environment. E.g. http://Intranet.SharePoint/_layouts/viewlsts.aspx page shows
Limited-access user permission lockdown mode Feature in SharePoint Limited-access user permission lockdown mode Feature in SharePoint Reviewed by Salaudeen Rajack on June 18, 2018 Rating: 5

SharePoint Online: How to Approve Multiple Documents using PowerShell?

June 17, 2018    , ,
Requirement: Approve Multiple Documents in SharePoint Online using PowerShell How to Approve Multiple Items in SharePoint Online? When content approval is turned ON, each item must be approved in order to be visible to users. You can approve any item or document in SharePoint Online by: Right click on the document >> Click on More >> Approve/Reject >> Approve Approve a SharePoint Online Document using PowerShell: Let's approve a single file. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Parameters $SiteURL = "https://crescenttech.sharepoint.com" $FileRelativeURL ="/Shared Documents/Compliance Process.xlsx" $ApprovalComments= "Approved by the Admin" #Get cr
SharePoint Online: How to Approve Multiple Documents using PowerShell? SharePoint Online: How to Approve Multiple Documents using PowerShell? Reviewed by Salaudeen Rajack on June 17, 2018 Rating: 5

SharePoint Online: Download All Versions of a Document using PowerShell

June 17, 2018    , , ,
Requirement: Download All Versions of a Document in SharePoint Online using PowerShell SharePoint Online: PowerShell to Download All Versions of a Document Version history in SharePoint Online lets you to store, track, and restore files in a library as they are changed. There are times you may need to download all previous versions of a file. As downloading each version of a file is time-consuming and cumbersome from web UI, Here is the PowerShell to download all versions of a file from a SharePoint Online document library using CSOM. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Parameters $SiteURL = "https://crescenttech.sharepoint.com" $FileRelativeURL ="/Shared Documents/Discloser China.doc&qu
SharePoint Online: Download All Versions of a Document using PowerShell SharePoint Online: Download All Versions of a Document using PowerShell Reviewed by Salaudeen Rajack on June 17, 2018 Rating: 5

How to Configure Audit Log to Capture All Deletes in SharePoint?

June 16, 2018    , ,
Requirement:   Track all delete operations in SharePoint How to Configure Audit Settings to Track Deletes in SharePoint Online? We can Track All Deletes in a SharePoint site collection using Audit Log Feature in three steps: Step 1: Make sure Reporting Feature is activated: Go to "Site Settings" >> Click on "Site collection features" under "Site Collection Administration" Find "Reporting" Feature and Click on "Activate". Step 2: Configure Audit Log Settings to Track Delete Go to "Site Settings" >> Click on "Site collection audit settings" under "Site Collection Administration" Enable "Deleting or restoring items" Checkbox and Click on "OK" Step 3: View all Delete Events Once the auditing feature is configured to capture deletes, you can view list of delete events captured from: Go to "Site Settings" >> Click on "Audit log reports&
How to Configure Audit Log to Capture All Deletes in SharePoint? How to Configure Audit Log to Capture All Deletes in SharePoint? Reviewed by Salaudeen Rajack on June 16, 2018 Rating: 5

SharePoint Online: Find Permission Changes using Audit Reports

June 15, 2018    , ,
Requirement: Get all permission changes in a SharePoint Online site collection. Auditing permission changes is critical for SharePoint Online security. Audit reports provides permission changes report to track changes to security such as modifications to permissions, permission inheritance, group membership and security related events. Step 1: Activate "Reporting" feature for the Site Collection Activate "Reporting" feature if its not activated already. Navigate to "Site Settings" >> Under "Site Collection Administration", Click on "Site collection features" Click on "Activate" button next to "Reporting"   Step 2: Configure Audit Settings for Permission Changes The next step is to enable security changes flag for auditing. Here is how to enable audit for permission changes in SharePoint Online: Create a new document library to store audit logs Go to "Site Settings" >> Click on
SharePoint Online: Find Permission Changes using Audit Reports SharePoint Online: Find Permission Changes using Audit Reports Reviewed by Salaudeen Rajack on June 15, 2018 Rating: 5

How to Create App Catalog Site in SharePoint Online?

June 15, 2018    , , ,
What is App Catalog in SharePoint Online? App Catalog in SharePoint is a central location where we can manage custom developed apps or 3rd party apps and make them available for users to download across all site collections. These apps are listed under "From Your Organization" link when you try to add a new app from Site Contents page of your SharePoint Online site. Create App Catalog Site Collection in SharePoint Online You can create a tenant app catalog to make apps available to your SharePoint Online users. App catalog is nothing is a site collection and here is how to create app catalog in SharePoint Online: Login to your SharePoint Online admin center as SharePoint Online Administrator: https://YourTenant-admin.sharepoint.com/ Click on "Apps" link from the left navigation of SharePoint admin center >> Click on "App Catalog" link in Apps page. The first time you select the App Catalog link, you are prompted to create a new app catalog
How to Create App Catalog Site in SharePoint Online? How to Create App Catalog Site in SharePoint Online? Reviewed by Salaudeen Rajack on June 15, 2018 Rating: 5

SharePoint Online: Bulk Update All Items in Large List using PowerShell

June 14, 2018    , ,
Requirement: Bulk Update SharePoint Online List Items using PowerShell How to Update Large Number of List Items in Bulk using PowerShell? While lists < 5000 items can be updated using the approach in my another post, Update SharePoint Online List using PowerShell , How about updating large lists with more than 5000 list items? Well, large lists must be updated in batches. Here is my PowerShell script to update large lists in bulk: This PowerShell script updates the "Title" field value from "File Name". #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Parameters $SiteURL = "https://crescenttech.sharepoint.com" $ListName = "Documents" $UserName = "Salaudeen@CrescentTec
SharePoint Online: Bulk Update All Items in Large List using PowerShell SharePoint Online: Bulk Update All Items in Large List using PowerShell Reviewed by Salaudeen Rajack on June 14, 2018 Rating: 5

SharePoint Online: Delete List Items Created in the Past 7 Days

June 12, 2018    , , ,
Requirement: Delete All List Items created within the past 7 days in SharePoint Online List PowerShell to Delete SharePoint Online List Items based on Created Date #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Parameters $SiteURL = "https://crescenttech.sharepoint.com" $UserName = "Salaudeen@CrescentTech.com" $Password = "Password" $SecurePassword= $Password | ConvertTo-SecureString -AsPlainText -Force #Setup the Context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName, $SecurePassword) #Get the List $List = $Ctx.Web.Lists.GetByTitle("Documents") #Query t
SharePoint Online: Delete List Items Created in the Past 7 Days SharePoint Online: Delete List Items Created in the Past 7 Days Reviewed by Salaudeen Rajack on June 12, 2018 Rating: 5

SharePoint Online: Fix "The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested" Error in PowerShell

June 11, 2018    , , ,
Error: The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. Root cause: You must load the object before you are trying retrieve its properties! Solution: Here is how the problem can be resolved #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Parameters $SiteURL = "https://crescenttech.sharepoint.com" $UserName = "Salaudeen@TheCrescentTech.com" $Password = "Password goes here" $SecurePassword= $Password | ConvertTo-SecureString -AsPlainText -Force #Setup the Context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Clien
SharePoint Online: Fix "The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested" Error in PowerShell SharePoint Online: Fix "The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested" Error in PowerShell Reviewed by Salaudeen Rajack on June 11, 2018 Rating: 5

SharePoint Online: Fix for "The remote server returned an error: (403) Forbidden" in PowerShell

June 11, 2018    , ,
Error: Exception calling "ExecuteQuery" with "0" argument(s): "The remote server returned an error: (403) Forbidden." Troubleshooting Checklist: You may provided the credentials of another tenant which would end up with this error message (Happens when working with multiple tenants!) So make sure the URL and credentials are correct. You may be missing the SharePoint Online Client Component SDK on your client computer. Make sure you have the latest version installed. You may be trying to access a site which you don't have access!  If you have two factor authentication enabled, You need to be in your organization network as per your tenant settings! The credential you pass, must be of type "SharePointOnlineCredentials". E.g. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Com
SharePoint Online: Fix for "The remote server returned an error: (403) Forbidden" in PowerShell SharePoint Online: Fix for "The remote server returned an error: (403) Forbidden" in PowerShell Reviewed by Salaudeen Rajack on June 11, 2018 Rating: 5

SharePoint Online: Bulk Import Users to Groups from a CSV File using PowerShell

June 11, 2018    , , , ,
Requirement: Bulk add users from a CSV file to SharePoint Online Groups Here is the CSV file with users and groups data: SharePoint Online: Bulk Add Users to Group using PowerShell  SharePoint Online groups helps to manage security effectively by combining users accounts and security groups. Typically, Active Directory user and security groups will be added to SharePoint groups, and then SharePoint groups are used to assign permissions within sites. Here is my PowerShell script to import users from a CSV file to SharePoint Online groups. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Function Import-SPOUserFromCSV($CSVFile) { #Get data from CSV $UserData = Import-CSV $CSVFile #Get Credentials to co
SharePoint Online: Bulk Import Users to Groups from a CSV File using PowerShell SharePoint Online: Bulk Import Users to Groups from a CSV File using PowerShell Reviewed by Salaudeen Rajack on June 11, 2018 Rating: 5

SharePoint Online: How to Get Direct Link to a Document In Modern Libraries?

June 11, 2018    ,
Requirement:   Get direct link to document in SharePoint Online. SharePoint Online: Get Direct Link to Document  Unlike SharePoint Online classic experience, modern document libraries doesn't provide direct link to documents. However, here is the trick to get direct link to file: Navigate to your SharePoint Online document library, Select the file and click on "Copy Link" from toolbar. In the link settings popup, Select "People with existing access" and click on Apply. That gets you the link something like: https://crescenttech.sharepoint.com/ :w:/r /Documents/2018/ComplianceDeclaration.xlsx ?d=wfd7f94f6baf55c2eaeb7e906ebd7ffb5&csf=1&e=Yys7gY Remove everything from ?d= and remove /:w:/r (sometimes :/x) and the direct link will be: https://crescenttech.sharepoint.com/Documents/2018/ComplianceDeclaration.xlsx Get Direct Link to File in SharePoint Online from Version History: If you have Version history enabled, you can copy the direct link fr
SharePoint Online: How to Get Direct Link to a Document In Modern Libraries? SharePoint Online: How to Get Direct Link to a Document In Modern Libraries? Reviewed by Salaudeen Rajack on June 11, 2018 Rating: 5

SharePoint Online: Get Document Library Size using PowerShell

June 10, 2018    , , , ,
Requirement: Get the Size of a SharePoint Online Document Library PowerShell to Get List or Document Library Size in SharePoint Online: #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Function to Get the size of a List or Library in SharePoint Online Function Get-SPOListSize($SiteURL, $ListName) { Try { #Get credentials to connect to SharePoint Online $Credentials = Get-Credential #Set up the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Query to Get all List Items from all folders - exclude Folder obj
SharePoint Online: Get Document Library Size using PowerShell SharePoint Online: Get Document Library Size using PowerShell Reviewed by Salaudeen Rajack on June 10, 2018 Rating: 5

SharePoint Online: Get Subsite Size using PowerShell

June 10, 2018    , , ,
Requirement: Get Subsite Size in SharePoint Online How to Get Subsite Size in S harePoint Online ? To find out the storage quota occupied by a subsite in SharePoint Online, go to: Site Settings >> Click on "Storage Metrics" link under "Site Collection Administration" Please note the data shown in storage metrics is not real time! It takes a while for a background timer job to run and populate this data. Get Subsite Size in SharePoint Online using PowerShell Here is the PowerShell to get subsite size in SharePoint Online. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Function to Get the size of a Folder in SharePoint Online Function Get-SPOFolderSize([Microsoft.SharePoint.Client.Fo
SharePoint Online: Get Subsite Size using PowerShell SharePoint Online: Get Subsite Size using PowerShell Reviewed by Salaudeen Rajack on June 10, 2018 Rating: 5

SharePoint Online: How to Change Date Format to "DD/MM/YYYY"?

June 09, 2018    , , ,
Requirement: Change Date format to "DD/MM/YYYY" in SharePoint Online. How to Set Date Format in SharePoint Online? By default, SharePoint Online sites display the dates in US format (MM/DD/YYYY). You may want to change the date format based on the country you live. Let's see how to set date format for a SharePoint Online site: Open your SharePoint site in web browser Click on Settings gear >> Click on Site settings In Site settings page, Under Site Administration, click on "Regional settings" link. Click on Locale drop down list arrow, and then select the locale to display dates. E.g. English United Kingdom This changes the date format everywhere in the site. E.g. List, Columns including Created/Modified, Recycle bin, etc. Pretty simple, huh? Well, The pain part is regional settings should be configured for each site (subsite)! Changing regional settings in the top level site doesn't automatically propagate the change in its subsites.
SharePoint Online: How to Change Date Format to "DD/MM/YYYY"? SharePoint Online: How to Change Date Format to "DD/MM/YYYY"? Reviewed by Salaudeen Rajack on June 09, 2018 Rating: 5

SharePoint Online: Publish All Files in a Library using PowerShell

June 08, 2018    , , ,
Requirement: Bulk Publish Multiple Files in SharePoint Online PowerShell to Check-in, Approve and Publish All Files in a Library: When you turn ON minor versioning in SharePoint Online document library, any edits will not appear to users with read-only (or view only) permissions until you publish them. Publishing each file individually in large libraries is definitely cumbersome, So here is my PowerShell script to publish all of them at once. Say, you want to publish all pages in "Pages" library in SharePoint Online. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Set Parameters $SiteURL="https://crescenttech.sharepoint.com" $ListName ="Team Documents" #Get Credentials to connect $Cred=
SharePoint Online: Publish All Files in a Library using PowerShell SharePoint Online: Publish All Files in a Library using PowerShell Reviewed by Salaudeen Rajack on June 08, 2018 Rating: 5

SharePoint Online: How to Publish a File using PowerShell

June 08, 2018    , ,
Requirement: Publish a Document in SharePoint Online How to Publish a File in SharePoint Online? When you enabled minor versions (or drafts) in SharePoint Online, all changes to any document isn't available to users with read only permissions, until its Published. Published documents becomes major versions such as 1.0. Here is how to publish a file in SharePoint Online: Navigate to the document library where your file is located. Right click on the document to publish >> In the context menu, choose More >> and then click on Publish. Enter a comment in the Comments box and click on OK. It publishes a major version and file can be viewed by others now! PowerShell to Publish a Document in SharePoint Online: #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extens
SharePoint Online: How to Publish a File using PowerShell SharePoint Online: How to Publish a File using PowerShell Reviewed by Salaudeen Rajack on June 08, 2018 Rating: 5
Powered by Blogger.