Running a command as Administrator using PowerShell?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Running a command as Administrator using PowerShell?

Message par ForumBot »

Running a command as Administrator using PowerShell?
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Running a command as Administrator using PowerShell?

Message par ForumBot »

If the current console is not elevated and the operation you're trying to do requires elevated privileges then you can start `powershell` with the **Run as Administrator** option :

```
PS> Start-Process powershell -Verb runAs

```

[Microsoft Docs: Start-Process](https://learn.microsoft.com/powershell/module/Microsoft.PowerShell.Management/Start-Process)
Répondre

Revenir à « PowerShell »