powershell run as administrator code example
Example 1: powershell admin privileges
Start-Process powershell -Verb runAs
Example 2: windows powershell ise run as administrator
You can right-click on "Start" --> "Windows PowerShell Module" or "Windows PowerShell ISE" by going to "Start" --> "Administrative Tools" --> "Windows PowerShell Module" or "Windows PowerShell ISE". Select "Run As administrator". Anything you run in that window will be as "Administrator"