kwizcom banner advertisement

SharePoint Online: Get List Views using PowerShell

July 28, 2017    , , ,
Requirement: Get SharePoint Online List Views using PowerShell. PowerShell to Get All Views from a List: This PowerShell script gets all views from a SharePoint Online list or library. #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" #Config Parameters $SiteURL= "https://crescent.sharepoint.com/" $ListName="Projects" #Setup Credentials to connect $Cred = Get-Credential $Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password) Try { #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = $Cred #Get the List $List=$Ctx.Web.Lists.GetByTitle($ListName) #$Ctx.Load($List)
SharePoint Online: Get List Views using PowerShell SharePoint Online: Get List Views using PowerShell Reviewed by Salaudeen Rajack on July 28, 2017 Rating: 5

SharePoint Online: Get List Settings using PowerShell

July 28, 2017    , , ,
Requirement: Get SharePoint Online list settings using PowerShell How to Get List Properties in SharePoint Online? To get list properties such as List Title, Description, Versioning Settings, Require Checkout , etc you can head on to List setting page. SharePoint Online: PowerShell to Get List Properties You can get list properties of a SharePoint Online list using this 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 Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Config Parameters $SiteURL= "https://crescent.sharepoint.com/" $ListName="Projects" #Setup Credentials to connect $Cred = Get-Credential $Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password) Try {
SharePoint Online: Get List Settings using PowerShell SharePoint Online: Get List Settings using PowerShell Reviewed by Salaudeen Rajack on July 28, 2017 Rating: 5

SharePoint Online: Hide a Content Type using PowerShell

July 27, 2017    , , ,
Requirement: Hide a Content Type in SharePoint Online PowerShell to Hide a Content Type 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" #Config Parameters $SiteURL="https://crescent.sharepoint.com" $ContentTypeName="Business Contacts" Try { #Get Credentials to connect $Cred= Get-Credential #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Get the content type from the web $ContentTypeColl = $Ctx.Web.ContentTypes $Ctx.Load($ContentTypeColl) $Ctx.ExecuteQuery() #Get the co
SharePoint Online: Hide a Content Type using PowerShell SharePoint Online: Hide a Content Type using PowerShell Reviewed by Salaudeen Rajack on July 27, 2017 Rating: 5

How to Download All Files from a SharePoint Site?

July 25, 2017    , , ,
Requirement: Download All Files from a SharePoint Site How to Download All Files in SharePoint Site?  To download all files from a SharePoint document library or folder, Simply use "Explore View". Navigate to your SharePoint On-premises or SharePoint Online library. Click on "View in File Explorer" from Views Drop down in SharePoint Online. For SharePoint On-premises, Click on "Open with Explorer" button in "Library" tab. From the Explore view, you can download all documents or all attachments from any list or library to your local machine. Now in the Explorer view, navigate one level up and you can download the complete site or site collection using explorer view by navigating up and down to the site, list or library objects. In modern libraries, You can simply select all files and hit "Download" button to download all files from a document library. PowerShell to Download All Files from SharePoint site: We can also
How to Download All Files from a SharePoint Site? How to Download All Files from a SharePoint Site? Reviewed by Salaudeen Rajack on July 25, 2017 Rating: 5

SharePoint Online: Enable Auditing using PowerShell

July 25, 2017    , , ,
Auditing in SharePoint Online helps to track user actions in a site collection. We generally use auditing to track how sites, content types, lists, libraries, and list items are used and as part of information management policy - security regularity and legal compliance. Knowing who has done what with which information is critical at many business scenarios. When the auditing feature is enabled, any combination of the following events can be audited: Editing items Checking out or checking in items Moving or copying items to another location in the site Deleting or restoring items Editing Content types and columns Searching site content editing users and permissions Compared with SharePoint On-premises, in SharePoint Online - viewing items in lists, and viewing item properties, opening or downloading documents are not available because of storage and performance concerns. How to Enable Auditing in SharePoint Online?  Auditing is not enabled by default. Auditing setting
SharePoint Online: Enable Auditing using PowerShell SharePoint Online: Enable Auditing using PowerShell Reviewed by Salaudeen Rajack on July 25, 2017 Rating: 5

SharePoint Online: PowerShell to Create Subsite from Custom Template

July 22, 2017    , , ,
Requirement: Create SharePoint Online subsite from custom site template using PowerShell. How to create a subsite from custom template in SharePoint Online?  To add a subsite in SharePoint online, follow these steps: Sign-in to your SharePoint online site >> Click on Site Settings gear Icon >> Choose "Site Contents" In site contents page, Click on "New" >> Click on "Subsite" link from the menu. Provide the Name, description and URL to your new subsite.  Under the "Template Selection" section, Select the template from "Custom" tab Specify other optional settings such as Permissions, Navigation, etc and click on"Create" button at the bottom of the page to create a subsite using specified site template in SharePoint Online. Lets see how to create a subsite using custom site template in SharePoint Online using PowerShell. SharePoint Online: Create Subsite from Custom Template using PowerShell A
SharePoint Online: PowerShell to Create Subsite from Custom Template SharePoint Online: PowerShell to Create Subsite from Custom Template Reviewed by Salaudeen Rajack on July 22, 2017 Rating: 5

SharePoint Online: Add Indexed Column using PowerShell

July 12, 2017    , , ,
Requirement: Create Indexed column SharePoint Online. How to Add Indexed Column in SharePoint Online? Indexed columns adds performance benefits in large lists when you frequently filter and query a column. To create indexed column SharePoint Online, follow these steps: Navigate to the List or Library >> List Settings Scroll down to the Columns section >> Click on Indexed columns. On the Indexed Columns page, click on "Create a new index".  Select a column from the drop-down in the Primary Column section. Click on Create. This creates index on the list. You can create up to 20 indexed columns in any SharePoint list or library. Please note, not every column type can be indexed , Such as: Multiple lines of text, Multi-valued Choice, Lookup, Hyperlink or Picture, Calculated columns, Custom Columns, Multi-valued Person or Group, External data. Auto-Indexing feature in SharePoint automatically creates appropriate indices when your list approaches
SharePoint Online: Add Indexed Column using PowerShell SharePoint Online: Add Indexed Column using PowerShell Reviewed by Salaudeen Rajack on July 12, 2017 Rating: 5

PowerShell to Manage Files Which Have No Checked in Version in SharePoint

July 11, 2017    , , ,
Requirement:   PowerShell to Manage files which have no checked in version in SharePoint. How to Manage files which have no checked in version in SharePoint 2013? When a file is uploaded through explorer view or multiple file upload - without supplying mandatory column values or when you have "Require Check out" option set to "Yes", then the file becomes "File with no checked in version"! These files with no check in version don't appear for any other users, even to administrators - until the one who uploaded checks them in. As a administrator, you can take control over those files with "Manage files which have no checked in version" link in the library settings. How to Take the Control of Files which have no checked in version? The manage checked out files page gives you the list of all documents which are uploaded to the document library but never checked in. Any user with full control access rights can take ownership of these docu
PowerShell to Manage Files Which Have No Checked in Version in SharePoint PowerShell to Manage Files Which Have No Checked in Version in SharePoint Reviewed by Salaudeen Rajack on July 11, 2017 Rating: 5

PowerShell to Inject JavaScript or CSS using Custom Action in SharePoint

July 10, 2017    , , , , ,
Requirement: Inject JavaScript or CSS in SharePoint without editing Master page PowerShell to Inject JavaScript in SharePoint using Custom Action: Assuming "ga.js" file is already uploaded to Site Assets library, here is the PowerShell for JavaScript injection in SharePoint master page. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Set Site variable $SiteURL="http://intranet.crescent.com" $CustomActionTitle ="Google Analytics" Try { #Get the Web $Web = Get-SPWeb $SiteURL #Check if the Custom Action Exists already $CustomAction = $web.UserCustomActions | Where { $_.Title -eq $CustomActionTitle } If($CustomAction -eq $Null) { #Add new custom action $UserCustomAction = $web.UserCustomActions.Add() #Set the Properties of the custom action $UserCustomAction.Title = $CustomActionTitle $UserCustomAction.Location = "ScriptLink" $UserCustomAct
PowerShell to Inject JavaScript or CSS using Custom Action in SharePoint PowerShell to Inject JavaScript or CSS using Custom Action in SharePoint Reviewed by Salaudeen Rajack on July 10, 2017 Rating: 5

Find All Custom Actions in SharePoint using PowerShell

July 10, 2017    , , ,
PowerShell to Get Custom Actions in SharePoint Custom actions may be deployed to site, web or list scopes. Here is a PowerShell script to list all custom actions from the given web scope. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Set Site variable $SiteURL="http://intranet.crescent.com" Try { #Get the Web $Web = Get-SPWeb $SiteURL #Get All Custom Actions of the web $CustomActions = $web.UserCustomActions If($CustomActions -ne $Null) { #Get custom action ForEach($CustomAction in $CustomActions) { Write-Host -f Green "Custom Action Title: '$($CustomAction.Title)' ID: $($CustomAction.ID)" } } Else { write-host -f Yellow "No Custom Actions Found!" } } Catch { Write-Host -ForegroundColor Red "Error:" $_.Exception.Message } PowerShell to Find All Custom Actions in a Site Collection Add-PSSnapin Microsoft.S
Find All Custom Actions in SharePoint using PowerShell Find All Custom Actions in SharePoint using PowerShell Reviewed by Salaudeen Rajack on July 10, 2017 Rating: 5

Remove Custom Action in SharePoint using PowerShell

July 10, 2017    , , , ,
Requirement:   Remove a Custom Action in SharePoint using PowerShell Delete Custom Action using PowerShell in SharePoint: Here is how to remove custom action in SharePoint 2013 using PowerShell Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Set Site variable $SiteURL="http://intranet.crescent.com" $CustomActionTitle ="Support Center" Try { #Get the Web $Web = Get-SPWeb $SiteURL #Get the Custom Actions Filter by Title $CustomActions = $web.UserCustomActions | Where { $_.Title -eq $CustomActionTitle } | Select ID, Title If($CustomActions -ne $Null) { #Delete custom action(s) $CustomActions | ForEach-Object { #Remove the custom action $web.UserCustomActions.Item($_.Id).Delete() Write-Host -f Green "Custom Action '$($_.Title)' Deleted Successfully!" } } Else { write-host -f Yellow "Custom Action '$Custom
Remove Custom Action in SharePoint using PowerShell Remove Custom Action in SharePoint using PowerShell Reviewed by Salaudeen Rajack on July 10, 2017 Rating: 5

How to Add a Custom Action in SharePoint using PowerShell?

July 10, 2017    , , ,
Requirement: Add Custom Action using PowerShell in SharePoint. PowerShell to Create User Custom Action in SharePoint: Here is the PowerShell to add user custom action - which adds a link to site settings menu Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Set Site variable $SiteURL="http://intranet.crescent.com" $CustomActionTitle ="Support Center" Try { #Get the Web $Web = Get-SPWeb $SiteURL #Check if the Custom Action Exists already $CustomAction = $web.UserCustomActions | Where { $_.Title -eq $CustomActionTitle } If($CustomAction -eq $Null) { #Add new custom action $UserCustomAction = $web.UserCustomActions.Add() #Set the Properties of the custom action $UserCustomAction.Title = $CustomActionTitle $UserCustomAction.Location = "Microsoft.SharePoint.StandardMenu" $UserCustomAction.Group = "SiteActions" #Site Settings Menu $User
How to Add a Custom Action in SharePoint using PowerShell? How to Add a Custom Action in SharePoint using PowerShell? Reviewed by Salaudeen Rajack on July 10, 2017 Rating: 5

SharePoint Online: Hide a Ribbon Button using Custom Action in PowerShell

July 09, 2017    , , ,
Requirement: SharePoint Online Hide New Document Button in the ribbon. SharePoint Online: PowerShell to Add Custom Action To Hide New Document Button of a Library Here is the PowerShell to hide new button in SharePoint Online document library. #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 parameter values $SiteURL="https://crescenttech.sharepoint.com/" $ListName ="Team Documents" $Location = "Ribbon.Documents.New.NewDocument" $CustomActionTitle ="HideNewButton" Try{ #Get Credentials to connect $Cred= Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Setup the context
SharePoint Online: Hide a Ribbon Button using Custom Action in PowerShell SharePoint Online: Hide a Ribbon Button using Custom Action in PowerShell Reviewed by Salaudeen Rajack on July 09, 2017 Rating: 5

SharePoint Online: Find All Custom Actions using PowerShell

July 08, 2017    , , ,
Requirement: Find All Custom Actions in SharePoint Online PowerShell to Get All User Custom Actions in SharePoint Online: Custom Actions is a powerful mechanism to add Customization on SharePoint. I have a requirement to prepare the inventory of all custom actions on a particular site. Here is the PowerShell script to find custom actions on a given site. #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 parameter values $SiteURL="https://crescent.sharepoint.com/" Try{ #Get Credentials to connect $Cred= Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Setup the context $Ctx = New-Object Microsoft
SharePoint Online: Find All Custom Actions using PowerShell SharePoint Online: Find All Custom Actions using PowerShell Reviewed by Salaudeen Rajack on July 08, 2017 Rating: 5

SharePoint Online: Remove Custom Action Using PowerShell CSOM

July 08, 2017    , ,
Requirement: Delete a Custom Action in SharePoint Online using PowerShell SharePoint Online: PowerShell to Remove Custom Action Here is the PowerShell CSOM script to remove custom action. #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 parameter values $SiteURL="https://crescenttech.sharepoint.com/" $CustomActionTitle = "SharePoint Admin Center" Try{ #Get Credentials to connect $Cred= Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = $Credentials #Get All Custom Actions
SharePoint Online: Remove Custom Action Using PowerShell CSOM SharePoint Online: Remove Custom Action Using PowerShell CSOM Reviewed by Salaudeen Rajack on July 08, 2017 Rating: 5

SharePoint Online: Add Custom Action using PowerShell

July 08, 2017    , ,
Requirement: Create Custom Action in SharePoint Online using PowerShell How to a Add Custom Action in SharePoint Online? User custom actions in SharePoint Online is a recommended way to customizing user interface, such as adding new link to Site Settings page, add menu items, ribbon buttons-groups, inject JavaScript or CSS to SharePoint. Here is an example to add custom action in SharePoint Online. SharePoint Online Add Custom Action using PowerShell Here is the PowerShell to Create Custom Action 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 parameter values $SiteURL="https://crescent.sharepoint.com/" $CustomActionTitle = "SharePoint Admin Center" Try{ #Get C
SharePoint Online: Add Custom Action using PowerShell SharePoint Online: Add Custom Action using PowerShell Reviewed by Salaudeen Rajack on July 08, 2017 Rating: 5

Archive ULS & IIS Log Files in SharePoint using PowerShell

July 08, 2017    , , , ,
Requirement: Archive Log files of IIS and ULS Log.  Log files in SharePoint (both IIS Log and ULS Log) could grow and fill-up the disk space based on your configurations and usage. There are many scripts available in various blogs and boards and Here is my own script to archive Log files on SharePoint servers. PowerShell to Archive Log Files in SharePoint: Set the Log file path and archive location in the configuration parameters section and run the script. This script does the following: Copies all log files which are last modified before 7 Days or earlier from today, to a folder. Create a Zip file from the folder containing log files to archive. Deletes old log files. Add-Type -Assembly System.IO.Compression.FileSystem #Configuration Parameters $LogFilesPath="C:\inetpub\logs\LogFiles\W3SVC3" $ArchivePath="C:\LogArchive" #Get All Log Files Modified before Last Week $LogFilesToArchive = Get-ChildItem -Path $LogFilesPath -recurse | where-object {$_.La
Archive ULS & IIS Log Files in SharePoint using PowerShell Archive ULS & IIS Log Files in SharePoint using PowerShell Reviewed by Salaudeen Rajack on July 08, 2017 Rating: 5

SharePoint Online: PowerShell to Bulk Check In All Documents

July 08, 2017    ,
Requirement: Bulk Check in All Documents in SharePoint Online using PowerShell We have a very large document library with bunch of documents check out and want them to check in to make available to end users. Tried creating a view which filters all checked out files, but failed since the list item count is > 5000 (List view threshold issue!) S harePoint Online: PowerShell to Check in All Documents Here is the PowerShell to check in multiple files in SharePoint Online document library. #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 parameter values $SiteURL="https://crescent.sharepoint.com/" $LibraryName="Documents" Try{ #Get Credentials to connect $Cred= Get-Credential $Cr
SharePoint Online: PowerShell to Bulk Check In All Documents SharePoint Online: PowerShell to Bulk Check In All Documents Reviewed by Salaudeen Rajack on July 08, 2017 Rating: 5

How to Download a Folder from SharePoint Online using PowerShell?

July 02, 2017    , , ,
Requirement : Download folder from SharePoint Online How to Download a Folder from SharePoint Online? To download a folder in SharePoint online, Follow these steps: Login to your SharePoint Online Site, Navigate to the Folder you want to download. Right click on the Folder  >> Choose "Download" from the context menu. You can also use the "Download" button from the toolbar. This brings you a Zip file with the Selected folder and its Sub-Folders and its files.   Download SharePoint Online Folder using PowerShell:  Now, when we need to download a folder repeatedly, or automatically on a schedule basis, we can utilize PowerShell. Here is my PowerShell to download a folder from 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 Extensio
How to Download a Folder from SharePoint Online using PowerShell? How to Download a Folder from SharePoint Online using PowerShell? Reviewed by Salaudeen Rajack on July 02, 2017 Rating: 5

PowerShell: Batch Process Large Lists to Fix "The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator." Error in SharePoint

July 01, 2017    , , , ,
Problem: When you are working with large lists > 5000 list items, any operation such as: Read/update/delete is controlled by list view threshold. You get an error message when you try to handle large list items: The attempted operation is prohibited because it  exceeds the list view threshold enforced by the administrator. Solution: Batch Process Large List Items You can always Increase the List View Threshold and other throttling settings in SharePoint Central Administration site, Here is how you can batch process list items to mitigate this issue: This Script would end-up in list view threshold error: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Set config variables $WebURL="http://intranet.crescent.com" $ListName ="LargeList" #Get Web and List Objects $Web = Get-SPWeb $WebURL $List = $Web.Lists[$ListName] $ListItems = $List.Items ForEach($Item in $ListItems) { Write-host "Processing List Item:"$Item.id
PowerShell: Batch Process Large Lists to Fix "The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator." Error in SharePoint PowerShell: Batch Process Large Lists to Fix "The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator." Error in SharePoint Reviewed by Salaudeen Rajack on July 01, 2017 Rating: 5

SharePoint Online: Set List Field Settings using PowerShell

July 01, 2017    , , , ,
Requirement: Update SharePoint Online List Field Settings using PowerShell PowerShell to Set Field Settings in SharePoint Online List: #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 Config Parameters $SiteURL="https://crescent.sharepoint.com/sites/projects" $ListName="Projects" $FieldName="HeadCount" #Internal Name #Get Credentials to connect $Cred= Get-Credential #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Get the List $List=$Ctx.Web.Lists.GetByTitle($ListName) #Get the List Field $Field=$List.Fields.GetByInternalName
SharePoint Online: Set List Field Settings using PowerShell SharePoint Online: Set List Field Settings using PowerShell Reviewed by Salaudeen Rajack on July 01, 2017 Rating: 5

SharePoint Online: Get List Field Properties using PowerShell

July 01, 2017    , , ,
Requirement: Get List Field Settings in SharePoint Online using PowerShell SharePoint Online: PowerShell to Get Field Properties This PowerShell script gets you the common properties from a SharePoint Online list field. #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 Config Parameters $SiteURL="https://crescent.sharepoint.com/sites/projects" $ListName="PMO Projects" $FieldName="HeadCount" #Internal Name #Get Credentials to connect $Cred= Get-Credential #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Get the List $List=$Ctx.We
SharePoint Online: Get List Field Properties using PowerShell SharePoint Online: Get List Field Properties using PowerShell Reviewed by Salaudeen Rajack on July 01, 2017 Rating: 5
Powered by Blogger.