On Windows Vista, Windows Server 2003, and later versions of Windows, when a cmdlet or function must be run with the permissions of a member of the Administrators group on the computer, Windows PowerShell displays the following error message.

  Copy Code
ERROR: Access is denied. You need to run this cmdlet from an elevated process.

In this context, elevated refers to Administrator permissions. To elevate a program or process, start the program or process with the Run as administrator option.

For example, to start a remote session on the local computer or to view or change settings for the local computer in the WSMan: drive, including changes to the session configurations, trusted hosts, ports, or listeners, start Windows PowerShell with the Run as administrator option.

Use one of the following two options.

To start Windows PowerShell with the "Run as administrator" option

  • In Windows, right-click a Windows PowerShell (or Windows PowerShell ISE) icon, and then click Run as administrator.

  • Or, in Windows PowerShell, use a Start-Process command with the RunAs verb.

      Copy Code
    start-process powershell -verb runAs

See Also