Powershell to export SharePoint version history

I have followed the following link to successfully export SharePoint list data to a csv format with Version History intact.

How can we read version history of document library and update particular version (few fileds) data in Sqlserver database?

However, I am hitting an issue with some colmns that are Multi line text fields with Rich Text Formats. This upsets the format of the CSV file with carriage returns and whitespace upsetting the alignment.

Any suggestions on how to get a neatly formatted CSV file that can achieve the above please?

Thanks in advance

Create document library from template with PowerShell

I’m attempting to create a document library from a .stp template. To my knowledge the script worked and now its not. I get an error when the following is executed:

$  ListCreation.ListTemplate = $  ListTemplate 

Exception setting “ListTemplate”: “Cannot convert the “Microsoft.SharePoint.Client.ListTemplate” value of type “Microsoft.SharePoint.Client.ListTemplate” to type “Microsoft.SharePoint.Client.ListTemplate”.”

I thought it may be the that I’ve referenced the wrong dll’s .

Have re-installed:

  1. Microsoft.SharePoint.Client.dll v 16.0.6518.1200
  2. Microsoft.SharePoint.Client.Runtime.Portable.dll v 16.0.6518.1200

Any ideas on the error ?

Thanks

Create document library from template with PowerShell

I’m attempting to create a document library from a .stp template. To my knowledge the script worked and now its not. I get an error when the following is executed:

$  ListCreation.ListTemplate = $  ListTemplate 

Exception setting “ListTemplate”: “Cannot convert the “Microsoft.SharePoint.Client.ListTemplate” value of type “Microsoft.SharePoint.Client.ListTemplate” to type “Microsoft.SharePoint.Client.ListTemplate”.”

I thought it may be the that I’ve referenced the wrong dll’s .

Have re-installed:

  1. Microsoft.SharePoint.Client.dll v 16.0.6518.1200
  2. Microsoft.SharePoint.Client.Runtime.Portable.dll v 16.0.6518.1200

Any ideas on the error ?

Thanks

Create document library from template with PowerShell

I’m attempting to create a document library from a .stp template. To my knowledge the script worked and now its not. I get an error when the following is executed:

$  ListCreation.ListTemplate = $  ListTemplate 

Exception setting “ListTemplate”: “Cannot convert the “Microsoft.SharePoint.Client.ListTemplate” value of type “Microsoft.SharePoint.Client.ListTemplate” to type “Microsoft.SharePoint.Client.ListTemplate”.”

I thought it may be the that I’ve referenced the wrong dll’s .

Have re-installed:

  1. Microsoft.SharePoint.Client.dll v 16.0.6518.1200
  2. Microsoft.SharePoint.Client.Runtime.Portable.dll v 16.0.6518.1200

Any ideas on the error ?

Thanks

Create document library from template with PowerShell

I’m attempting to create a document library from a .stp template. To my knowledge the script worked and now its not. I get an error when the following is executed:

$  ListCreation.ListTemplate = $  ListTemplate 

Exception setting “ListTemplate”: “Cannot convert the “Microsoft.SharePoint.Client.ListTemplate” value of type “Microsoft.SharePoint.Client.ListTemplate” to type “Microsoft.SharePoint.Client.ListTemplate”.”

I thought it may be the that I’ve referenced the wrong dll’s .

Have re-installed:

  1. Microsoft.SharePoint.Client.dll v 16.0.6518.1200
  2. Microsoft.SharePoint.Client.Runtime.Portable.dll v 16.0.6518.1200

Any ideas on the error ?

Thanks

Getting SP list item versions in Powershell doesn’t work

I’ve used PowerShell code similar to this Reference which gets a SP list and iterates thru the items (note that I use PnP). This works fine except that the loop that gets versions of list items doesn’t execute at all b/c the Versions member doesn’t seem to exist. I’m sure there is version info. I’m using SP 2013. Any ideas appreciated!

Connect-PnPOnline –Url "http://MyServer/MySite" –Credentials (Get-Credential) $  ItemsColl = (Get-PnPListItem -List "MySPList")  #Loop through each item foreach ($  item in $  ItemsColl) {     write-host $  ($  item["MyFieldName"])      # WORKS FINE!      #Iterate each version        foreach($  version in $  item.Versions) # FAILS! THIS OBJECT IS ALWAYS NULL (ALTHOUGH VERSIONS DO EXIST ON THIS SITE/LIST) SO LOOP DOESN'T EXECUTE.     {          write-host $  ($  version.VersionLabel)     } } 

How to pick up data using PowerShell from SharePoint Pages

We have a manual process at the moment where we have assigned “Content Owners” to out Sites/Sub-Sites. Content Owners, essentially have no greater permissions than regular users, but our Governance Team have assigned them to make the decision as to whether a User can access a resource within the Site Collection or not.

The Content Owner is assigned via a Web Part within the HomePage. Is there a way to pick up this data within a Script. I will be cycling through all Sites/Sub-Sites across my tenant. I know how to go through all Sites/SubSites, but just the data within the specific page isn’t available.

enter image description here

The other method I had in mind, which will require some development, is to create Dummy SharePoint Groups to hold this data. If anyone can think of another way, that would be much appreciated.

Thank you