简体   繁体   English

获取 SharePoint 列表项中的附件文件大小 - PnP Powershell

[英]Get the attachment file size in SharePoint list items - PnP Powershell

I need to get the file size of each of the attachments in a SharePoint List using PnP Powershell scripting.我需要使用 PnP Powershell 脚本获取 SharePoint 列表中每个附件的文件大小。 I am able to get the attachments' file names, but not the file size.我能够获取附件的文件名,但不能获取文件大小。

For file class in CSOM, you can use the length Property to estimate the file size.对于 CSOM 中的文件 class,您可以使用长度属性来估计文件大小。 PnP seems not to have property on file size. PnP 似乎对文件大小没有属性。

An example here for your reference: https://www.sharepointdiary.com/2019/05/sharepoint-online-get-attachments-from-list-using-powershell.html这里有一个示例供您参考: https://www.sharepointdiary.com/2019/05/sharepoint-online-get-attachments-from-list-using-powershell.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM