ps/Modules/Alkami.PowerShell.Common/Public/Grant-UserProfileSystemPerformanceRights.ps1

20 lines
510 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
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 $_)}
}