

REQUIRE_STORAGE_INTEGRATION_FOR_STAGE_CREATION This is the only account parameter that can be set by either account administrators (i.e users with the ACCOUNTADMIN system role) or security administrators (i.e users with the SECURITYADMIN system role). Used to enforce a session policy in the classic web interface and at query runtime. Used for encryption of files staged for data loading or unloading might require additional installation and configuration (see description for details).Īllows the SYSTEM$GET_PRIVATELINK_CONFIG function to return the private-internal-stages key in the query result. Used to enable connection caching in browser-based single sign-on (SSO) for Snowflake-provided clients Snowflake provides the following account parameters: Account parameters are set using the ALTER ACCOUNT command. StartDate = ($BeginDate).Account parameters can be set only at the account level by users with the appropriate administrator role. $searchunifiedAuditLogSplat = ($EndDate).ToString('MM/dd/yyyy HH:mm:ss') Write-Host "Finished Retrieving logs" -ForegroundColor Green $FileName = $FullReportFileName.Replace('Log_-_', "Log_-_$while ($unt % 5000 -eq 0 -and $unt -ne 0) $TimeStamp = $BeginDate.ToString('yyyy-MM-dd') New-Item -Path $FullTargetDir -ItemType Directoryįoreach ($Day in 0.(::DaysInMonth($CurrentYear, $LastMonthNumber) - 1)) If (-not (Test-Path -LiteralPath $FullTargetDir)) $FullReportFileName = Join-Path -Path $FullTargetDir -ChildPath $ReportFileName $ReportFileName = 'o365_UnifiedAuditLog_-_.csv' $FullTargetDir = Join-Path -Path $RootDir -ChildPath $TargetDir $TargetDir = "$CurrentYear\$LastMonthNumber"

$RootDir = "$env:USERPROFILE\Desktop\o365" $StartDate = Get-Date -Year $CurrentYear -Month $LastMonthNumber -Day 1 -Hour 0 -Minute 0 -Second 0 $LastMonthNumber = $Today.AddMonths(-1).ToString('MM') Haven't changed the script so not sure what changed to cause cmdlet not to be recognized anymore. It seems the term "Search-UnifiedAuditLog" is not recognized when running the script but when running it as a straight command it works. Was working fine for awhile but noticed in the past few month it won't export logs to the file anymore. This was a script to export the UAL to a csv.
