Hi Team,
I am trying to get webparts details from SharePoint 2013 sites. I have some custom webparts with some features. I am con not install that feature on SharePoint online site. So I am trying to those web parts details with PnP PowerShell command. Some of the webparts returns below url. Also in this it is not returing CData content.
XslLink = ~/_layouts/15/somename.industry.stylecomponents/xslt/linkbox.xslt
So we are thing we can read .xslt data and push it.
Sample code:
Connect-PnPOnline $SourceUrl -UseWebLogin
$WebPartManager = Get-PnPWebPart -ServerRelativePageUrl $PageUrl
#Get All Web Parts data
foreach ($WebPart in $WebPartManager) {
if ($WebPart.WebPart.Title.ToUpper().Contains('NWA'.ToUpper())) {
write-Host $($WebPart.WebPart.Title)
#$webpartProps = Get-PnPWebPartProperty -ServerRelativePageUrl $PageUrl -Identity $WebPart.Id
$webpartProps = $webpart.WebPart.Properties.FieldValues
foreach ($webpartProp in $webpartProps) {
Write-Host "Content : " $webpartProp["Content"]
}
}
Can anyone help us to how to get data from .xslt?
Thanks,
Harish Patil