Using Get-Privilege/Set-Privilege

Topics: Developer Forum, Project Management Forum, User Forum
Jul 9, 2012 at 10:23 PM
Edited Jul 10, 2012 at 2:56 PM

Hi all,

I'm looking to check for and potentially set "Lock Pages in Memory" during an install of SQL Server.  The Powershell Community Extensions seemed like the best bet for this, however I'm having trouble with it.  I'm following the example in the Help.  If it matters, I'm not setting it for myself, but for the service account that will be running SQL.

Anything fundamentally wrong with what I'm doing here?  I can make the change manually via secpol.msc, so I don't think it's a permissions issue, but perhaps the methods used in the module are blocked somehow.

_ _ _ _

Import-Module pscx
$p = Get-Privilege -Identity ""

Set-Privilege $p

Get-Privilege ""

_ _ _ _

When running the final Get-Privilege, I don't see SeLockMemoryPrivilege listed.  Any help is appreciated, thanks!