SharePoint Online: Download Attachments from List using PowerShell

January 31, 2017    , , ,
Requirement: Download attachments from SharePoint Online List How to download attachments from SharePoint List Items? Well, to download attachments of a particular list item, you can open the item in either in view or edit mode, right click on each attachment and choose save from browser context menu. In case, you want to download all attachments from a list item or all list items, use "Map Network Drive" feature. Here is how: Go to Windows Explorer (Windows Key + E), Right click on "This PC" from left tree view and choose "Map Network Drive" Select the drive such as "Z:" and enter the URL of your SharePoint list. E.g. http://intranet.crescent.com/Lists/Credit/ This opens Windows explorer view with attachments folder. Attachments are organized with sub-folders under attachment folder. Your list item id become the name of the sub-folder! from here, you can download all attachments by simply copy-pasting to your local machine. PowerSh
SharePoint Online: Download Attachments from List using PowerShell SharePoint Online: Download Attachments from List using PowerShell Reviewed by Salaudeen Rajack on January 31, 2017 Rating: 5

SharePoint Online: Copy List Items from One List to Another using PowerShell

January 31, 2017    , , , ,
Requirement: Copy List items to another list in SharePoint Online How to copy list items to another list in SharePoint Online? Use Quick Edit (Datasheet view) to copy-paste list items between lists in SharePoint online. Make sure you have matching columns and column order is same in both views. SharePoint Online: Copy List Item to Another List using PowerShell #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 Copy-ListItems() { param ( [Parameter(Mandatory=$true)] [string] $SiteURL, [Parameter(Mandatory=$true)] [string] $SourceListName, [Parameter(Mandatory=$true)] [string] $TargetListName ) Try { #Setup Credentials to connect $Cred = Get-Credential
SharePoint Online: Copy List Items from One List to Another using PowerShell SharePoint Online: Copy List Items from One List to Another using PowerShell Reviewed by Salaudeen Rajack on January 31, 2017 Rating: 5

SharePoint Online: How to Enable Versioning on a Document Library using PowerShell?

January 30, 2017    , , , ,
What is versioning in SharePoint Online? Version history feature in SharePoint Online tracks every change to the document and creates a copy of it when someone changes a document. Once you enable versioning settings for a list or Library, Versioning features are turned ON and all changes will be tracked. Site owners can view, manage, and restore previous versions of items. Each version of the document has the following: Version No When the version was created Who made the version (change) Size of the version Once the versioning feature is enabled, you can view/restore the previous versions of the document. How to Enable Version History in SharePoint Online Document Library? To Enable or Disable Versioning in SharePoint Online Document Library: Navigate to your document library >> Click on Settings gear >> and then "Library Settings" Menu item. Under Library settings page, Click on "Versioning Settings" Select "Create major versions&q
SharePoint Online: How to Enable Versioning on a Document Library using PowerShell? SharePoint Online: How to Enable Versioning on a Document Library using PowerShell? Reviewed by Salaudeen Rajack on January 30, 2017 Rating: 5

Explorer View in SharePoint Online

January 30, 2017    
SharePoint Online Explorer view provides great flexibility like Windows Explorer functionality to manage Files and folders. Majority of the usage: drag and drop! Where is Explorer View in SharePoint Online? Explorer view in SharePoint online modern UI is moved under View section! To enable explorer view in sharepoint online, Click on the View menu drop down from top-right area ( such as "All Documents")  >> Select "View in File Explorer" Menu item. >> This opens the document library in explorer view for SharePoint Online. SharePoint Online explorer view not working? or Greyed out? Explorer view is available only on 32 bit version of Internet Explorer! You cannot open in explorer view on Google Chrome or Microsoft Edge browsers. Now SharePoint Online modern document libraries also provides drag and drop functionalities. E.g. You can do multiple file upload with drag and drop Create folders and drag and drop files to it with in browser its
Explorer View in SharePoint Online Explorer View in SharePoint Online Reviewed by Salaudeen Rajack on January 30, 2017 Rating: 5

How to Disable Quick Edit in SharePoint?

January 30, 2017    , , , ,
Requirement:   Disable quick edit in SharePoint 2016 list. How to disable quick edit in sharepoint 2013 or SharePoint 2016? Bit background: We've a project tracking list with field "Project Health" which is updated by an event receiver based on certain parameters and business logic. So, we made the field hidden in SharePoint online using: SharePoint Online: How to Hide a Column from NewForm/EditForm? Now the problem is: users can go to "Quick Edit" mode of the list and they get hidden field there! Although the column was hidden from Edit and New Forms, SharePoint quick edit (which replaced Datasheet view in previous versions of SharePoint) still displays the hidden field and we decided to disable quick edit mode for the SharePoint list. SharePoint how to disable quick edit: To disable quick edit mode in SharePoint 2013/2016 or in SharePoint online, Go to the list settings >> Click on "Advanced settings" link In Advanced Settings link,
How to Disable Quick Edit in SharePoint? How to Disable Quick Edit in SharePoint? Reviewed by Salaudeen Rajack on January 30, 2017 Rating: 5

SharePoint Online: Loop Through All Subsites in a Site Collection using PowerShell

January 29, 2017    , , ,
Requirement: Often while working with SharePoint Online using Client Side object model, we need to loop through each site site under a site collection and here is the PowerShell script to iterate through each subsite and get its title. PowerShell CSOM Script to Iterate Through All Subsites in a Site Collection in SharePoint Online: This script iterates through each subsite and list all subsite URLs. #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" #Variables for Processing $SiteCollUrl = "https://crescent.sharepoint.com/sites/test/" #Get Credentials to connect $Cred= Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Custom func
SharePoint Online: Loop Through All Subsites in a Site Collection using PowerShell SharePoint Online: Loop Through All Subsites in a Site Collection using PowerShell Reviewed by Salaudeen Rajack on January 29, 2017 Rating: 5

SharePoint Online: Change Storage Quota of Site Collection using PowerShell

January 25, 2017    , , , ,
Requirement: Increase storage quota in SharePoint Online using PowerShell How to set the storage quota of a site collection in SharePoint Online? To set storage quota of SharePoint site collection, Follow these steps: Login to your SharePoint Online Admin Center (https://tenant-admin.sharepoint.com) Click on "Site Collections" link in left navigation. From the available site collections, Select the target site collection to change storage quota Click on "Storage Quota" button from the ribbon.  From the storage quota page, enter the new quota for your site collection. You can optionally enable Email notification to the site administrators when storage reaches particular threshold. Click on "Save" to commit apply new storage quota to your SharePoint Online site. How to Change storage quota using PowerShell in SharePoint Online ? To set storage quota in SharePoint Online, use: Set-SPOSite cmdlet. Here is how to increase storage quota in S
SharePoint Online: Change Storage Quota of Site Collection using PowerShell SharePoint Online: Change Storage Quota of Site Collection using PowerShell Reviewed by Salaudeen Rajack on January 25, 2017 Rating: 5

SharePoint Online: Update User Profile Properties using PowerShell

January 25, 2017    , , , ,
Requirement: Update User Profile Property in SharePoint Online using PowerShell How to Update User Profiles in SharePoint Online? To update SharePoint Online user profile properties, follow these steps: Login to SharePoint Online Admin Center >> Click on "User Profiles" link from the left navigation In User Profiles, Click on "Manage User Profiles" under People tab. Use Search to find the user profile of the user to update >> Click on "Edit My Profile" link from the context menu drop down of the user result. Update any allowed user profile property and click on "Save and Close" button. SharePoint Online: Update user profile using PowerShell Lets update "Department" field of SharePoint user profile. Here is the PowerShell for SharePoint Online to set User profile properties. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Micro
SharePoint Online: Update User Profile Properties using PowerShell SharePoint Online: Update User Profile Properties using PowerShell Reviewed by Salaudeen Rajack on January 25, 2017 Rating: 5

How to Create a Content Type in SharePoint using PowerShell?

January 24, 2017    , , , , ,
A Content Type in SharePoint is a fundamental framework for any item, such as Task, Document, Event, etc. Every content type has its own set of metadata columns and templates, information management policies, workflows. In SharePoint, we can create our own custom content types from existing content types, such as "Invoice" content type based on a document content type and add custom columns to it say "Invoice Date". How to Create a Content Type in SharePoint? To add a content type in SharePoint, follow these steps: Go to Site Settings >> Click on "Site Content Types" under "Web Designer Galleries" group. In Site content types page, You''ll see the list of default content types like Item, Tasks, Document, etc grouped by sections. Click on "Create" link at the top. Provide a name to your custom content type. Optionally you can enter the description for your new content type to make it purpose clear. Select the pare
How to Create a Content Type in SharePoint using PowerShell? How to Create a Content Type in SharePoint using PowerShell? Reviewed by Salaudeen Rajack on January 24, 2017 Rating: 5

SharePoint Online: Get User Profile Properties using PowerShell

January 24, 2017    , , , , , ,
Requirement: SharePoint Online Get All User Profiles and export to CSV. How to Get User Profile Properties in SharePoint Online? A user profile property is the field that holds user data such as "First Name", "Last Name", "Department", "Skills", etc. By default, SharePoint already has a rich set of user profile properties. To get all user profiles and user profile properties in SharePoint Online: Login to SharePoint Online Admin >> Click on "User Profiles" link from left navigation In User Profiles, Click on "Manage User Profiles" under People tab. Use Search to get the user profile of the user. This interface helps us to get individual user profiles and properties one by one. Now, Let's see how to get user profile properties in SharePoint Online using PowerShell. SharePoint Online PowerShell to Get User Profile Properties Here is the PowerShell to get all user profiles in SharePoint Online. It gets the
SharePoint Online: Get User Profile Properties using PowerShell SharePoint Online: Get User Profile Properties using PowerShell Reviewed by Salaudeen Rajack on January 24, 2017 Rating: 5

Configure Content Type Hub in SharePoint Online

January 24, 2017    ,
What is Content Type Hub in SharePoint Online? In SharePoint, The content types you create in one site collection can be used only within that site collection. To provide the ability to re-use them across different site collections in the tenant and standardize, we've to use content type hub. The Content Type Hub is a centralized location to manage content types in SharePoint Online. A content type hub is a special site collection configured to provide content types to other site collections. Without content type hub, You'll end up re-creating same content type and site columns again and again on all of the site collections. How to Create a Content Type Hub in SharePoint Online? In SharePoint On-premises, we create a site collection, activate "Content Type Syndication Hub" feature and configure it in MMS service application to create a content type hub ( How to Create Content Type Hub in SharePoint? ). However, In SharePoint Online, Content type hub site collecti
Configure Content Type Hub in SharePoint Online Configure Content Type Hub in SharePoint Online Reviewed by Salaudeen Rajack on January 24, 2017 Rating: 5

SharePoint Online: How to Make a Site Collection Read Only using Site Policy?

January 20, 2017    
Requirement: SharePoint Online Make Site Collection Read only. How to make a SharePoint Online Site Read Only? We've a business requirement to set a SharePoint online site collection into read-only mode, in order to prevent any further addition/modification of content but make the existing content available as read-only to the end users. Unlike SharePoint On-premises, there is no UI to make a SharePoint Online site or site collection read only. However, we can use site policies in SharePoint Online to make site collection read only. You can set the SharePoint online site collection lock status to "NoAccess" - But it defeats the purpose of Read-only mode! SharePoint Online: Make a Site Collection read only using  site policies Here is how to use SharePoint site policies for SharePoint Online to make site collection read only: Navigate to the site collection that you want to make Read Only >> Click on Settings Gear and then Site Settings Menu item. Click o
SharePoint Online: How to Make a Site Collection Read Only using Site Policy? SharePoint Online: How to Make a Site Collection Read Only using Site Policy? Reviewed by Salaudeen Rajack on January 20, 2017 Rating: 5

Get User Account By Display Name in SharePoint

January 08, 2017    , , , , ,
Requirement: Get user by display name in SharePoint We have a CSV file with list of projects and their Team leads information. This list to be updated on a SharePoint list. But the challenge is 'Team Lead' field has display names of users instead of account name (Domain\LoginID). So prior updating to SharePoint list, we need the Login ID of the user from his display name. Solution: Lets Query Active directory for the given display name to get the user's Login ID. Prerequisites: You need to have PowerShell module for Active directory installed to use: Import-Module ActiveDirectory ! Use PowerShell cmdlet: Add-WindowsFeature RSAT-AD-PowerShell to add AD Module for PowerShell to your server/desktop! Otherwise, you'll get an error message: "Import-Module : The specified module 'ActiveDirectory' was not loaded because no valid module file was found in any module directory" PowerShell script to get user accounts from display name and update SharePoi
Get User Account By Display Name in SharePoint Get User Account By Display Name in SharePoint Reviewed by Salaudeen Rajack on January 08, 2017 Rating: 5

How to Create Alert on List View in SharePoint?

January 06, 2017    , , , ,
Requirement: Create an Alert on SharePoint List View. How to Set Alert on Specific View in SharePoint? Alerts in SharePoint are used to trigger an Email or SMS when anything changes in list or libraries.  There are business scenarios where user wants to create an alert on a list view where items are filtered by a specific conditions. However, the option to create alert for specific view is not available for all list views! If you have a custom view with a filter applied based on a custom column (Not on Out of the box columns such as "Approval Status") of type: Single line of Text, Multiple lines of Text or Choice field - You'll get this option "Someone changes an item that appears in the following view" in new alert page! Any view with filters on System Generated and Calculated columns will not appear on Alert me page. So, to create alert on views, simply use "Alert me" button in the ribbon on any list or library, On the New Alert page, Pick
How to Create Alert on List View in SharePoint? How to Create Alert on List View in SharePoint? Reviewed by Salaudeen Rajack on January 06, 2017 Rating: 5

How to Hide a List View in SharePoint using PowerShell?

January 06, 2017    , , , ,
Requirement: Hide a List View in SharePoint How to Hide a SharePoint List View? To hide a list view in SharePoint, use this PowerShell script. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Config variables $SiteURL="http://intranet.crescent.com" $ListName="Projects" $ViewName="All Projects" #Get the View $Web = Get-SPWeb $SiteURL $List = $Web.Lists[$ListName] $View = $List.Views[$ViewName] #Hide the list view $View.Hidden=$true $View.Update() Write-host "List View Hidden from users!" This hides the list view from users by hiding it from view drop down and from list settings. However, if you know the URL, you can directly hit and get the view page! SharePoint Online: Hide a List View using PowerShell Similarly, in SharePoint Online hide list view, here is the PowerShell script. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16
How to Hide a List View in SharePoint using PowerShell? How to Hide a List View in SharePoint using PowerShell? Reviewed by Salaudeen Rajack on January 06, 2017 Rating: 5

How to Change Friendly Date Format in SharePoint?

January 06, 2017    , ,
Problem: After migrating to SharePoint 2016, all date columns changed to "Friendly" format! That is instead of exact date, date fields started showing values such as "2 days ago", "About a minute ago", "3 hours ago", "Today at 3:00 PM", etc. How to Change Friendly Date Format in SharePoint 2016? To change the date field to show date time in standard format, Go to List settings >> Pick the Field to get the Field settings  You can switch the format from Friendly to Standard mode. PowerShell to Disable Friendly Display Format in SharePoint Date Columns Lets disable friendly date format in all date columns of a SharePoint list using PowerShell. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Config variables $SiteURL="http://intranet.crescent.com" $ListName="Projects" #Get the List from the web $Web = Get-SPWeb $SiteURL $List = $Web.Lists[$ListName] #Loop through each l
How to Change Friendly Date Format in SharePoint? How to Change Friendly Date Format in SharePoint? Reviewed by Salaudeen Rajack on January 06, 2017 Rating: 5

PowerShell to Get-Set "Yes/No (Check box)" Field Value in SharePoint

January 05, 2017    ,
Requirement: PowerShell to get and set Yes/No field value in SharePoint SharePoint: Get Yes/No Field Value using PowerShell Here is the PowerShell to read Yes/No field programmatically in SharePoint. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Set variables $WebURL="http://intranet.crescent.com" $ListName ="ProjectTemp" $FieldName="IsActive" #Internal Name $ListItemID="1" #Get Web and List Objects $Web = Get-SPWeb $WebURL $List = $Web.Lists[$ListName] #Get the List Item by ID $ListItem = $List.GetItembyID($ListItemID) #Get the Yes/No Field Value $ListItem[$FieldName] This gets the value of yes/no field from the given list. Update Yes/No Field in SharePoint List using PowerShell PowerShell to Update Yes No field SharePoint list programmatically Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Set variables $WebURL="http://intranet.crescent.com" $ListName =&quo
PowerShell to Get-Set "Yes/No (Check box)" Field Value in SharePoint PowerShell to Get-Set "Yes/No (Check box)" Field Value in SharePoint Reviewed by Salaudeen Rajack on January 05, 2017 Rating: 5

SharePoint 2016: Cannot Find "Start" or "Stop" Options in Services on Server?

January 04, 2017    ,
Problem: On creating service applications, like in SharePoint 2013, tried starting service instances from "Services on Server" page of SharePoint 2016 Central Admin site, But couldn't find any option to start any service instances. This is because: We are using MinRoles farm topology! MinRole in SharePoint 2016 starts necessary services on respective servers automatically! We don't have to start service instances manually! Creating service applications automatically starts necessary service instances on required servers. So, We don't need to start any service instance from "Services on Server" page of SharePoint 2016 Central Administration site. MinRole service controls them all. Instead of specific MinRoles (like WFE, Application, Search, Cache) if you use "Custom" MinRole, you'll find "Start" and "Stop" links next to each service instance according to their current status.
SharePoint 2016: Cannot Find "Start" or "Stop" Options in Services on Server? SharePoint 2016: Cannot Find "Start" or "Stop" Options in Services on Server? Reviewed by Salaudeen Rajack on January 04, 2017 Rating: 5
Powered by Blogger.