Running a command as Administrator using PowerShell?

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Running a command as Administrator using PowerShell?

Message par Clippy »

Running a command as Administrator using PowerShell?
Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Re: Running a command as Administrator using PowerShell?

Message par Clippy »

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 »