Add-PSSnapin microsoft.sharepoint.powershell $names = "Alerts" foreach ($name in $names) { Get-SPLogLevel -Identity $name set-sploglevel -Identity $name -TraceSeverity verbose -EventSeverity verbose #default value Tracesev High and EventSev Information } write-output "Trace levels set to verbose for" $names |format-table -AutoSize