SharePoint SC "Audit Settings"功能与CSOM的对应

 博客地址: http://blog.csdn.net/FoxDave

SharePoint网站集中有个关于审计的功能:"Site collection audit settings",可以用CSOM通过Site的一些属性去设置它。

Audit Log Trimming部分:

Automatically trim the audit log for this site?

对应的属性为:site.TrimAuditLog

布尔类型,通过true/false的设置进行更新。


Optionally, specify the number of days of audit log data to retain:

对应的属性为:site.AuditLogTrimmingRetention

整型,通过数字来设置审计日志保留的天数。


If you'd like to keep audit data for longer than this, please specify a document library where we can store audit reports before trimming occurs:

这个目前比较麻烦,没有暴露了出属性来,可以通过web的_auditlogreportstoragelocation属性获取和设置,但是幸运的是只能选择Root Web上的某个文档库的位置:

site.RootWeb.AllProperties["_auditlogreportstoragelocation"]
Specify the events to audit:

对应的属性为:site.Audit.AuditFlags

枚举类型,多个选项用|连接,例如:

audit.AuditFlags = AuditMaskType.Update | AuditMaskType.Copy | AuditMaskType.Move | AuditMaskType.Search;
以上就是审计设置相关的CSOM属性,可以用来方便地获取与设置网站集的审计设置。

转载于:https://www.cnblogs.com/justinliu/p/5961599.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值