Quantcast
Channel: Microsoft Online: SharePoint Online forum
Viewing all articles
Browse latest Browse all 10096

How to Configure SharePoint Auditing Using PowerShell in SharePoint Online

$
0
0

Hi,

I want to enable SharePoint audit setting using PS. I am executing following steps. However I am getting below mentioned error.

Note: This command is working fine with my on premise environment. Any help would be appreciated.

Command: 

$site = Get-SPOSite "SiteURL"
$site.Audit.AuditFlags = [Microsoft.SharePoint.SPAuditMaskType]::Update
$site.Audit.Update()


Error:

Unable to find type [Microsoft.SharePoint.SPAuditMaskType]: make sure that the assembly containing this type is loaded.
At line:1 char:1
+ $site.Audit.AuditFlags = [Microsoft.SharePoint.SPAuditMaskType]::Update
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.SharePoint.SPAuditMaskType:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound




Viewing all articles
Browse latest Browse all 10096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>