function Grant-UserProfileSystemPerformanceRights { <# .SYNOPSIS Grants a User the Profile System Performance Right #> [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$userName ) $logLead = (Get-LogLeadName); Grant-UserLocalSecurityPolicyRights $userName "SeSystemProfilePrivilege" $secPolLogContent = Get-Content (Join-Path $env:windir "security\logs\scesrv.log") $secPolLogContent | ForEach-Object { Write-Verbose ("$logLead : {0}" -f $_)} }