open powershell as administrator and run code example Example: powershell admin privileges Start-Process powershell -Verb runAs