How do I run a ps1 script on the desktop using run as admin in windows 11?


martik777

Well-known member
Local time
8:49 PM
Posts
95
OS
W11 Pro
The option is no longer on the context menu like it was on win 10, so how can I run the script as admin?
 
Windows Build/Version
21H2 22000.978

My Computers

System One System Two

  • OS
    W11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Me
    CPU
    12100F
    Motherboard
    MSI B660M-a wifi pro
    Memory
    32GB
    Graphics Card(s)
    rx580
    Monitor(s) Displays
    2 x 27" 4k
    Screen Resolution
    4k standard
    Hard Drives
    None, SSD and Nvme
  • Operating System
    win10 and 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    4 DIY desktops + one thinkpad
    CPU
    i7 2600k, i7 4790k, AMD 1100t, i7 8650u (thinkpad laptop)
    Memory
    16GB minimum
    Graphics card(s)
    RX480/580's

My Computer

System One

  • OS
    Windows 11 Pro 64 bit 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Gigabyte Z390 UD
    CPU
    Intel Core i7 77000 3.60
    Motherboard
    Gigabyte Z390 UD
    Memory
    16 GB
    Graphics Card(s)
    nVidia GEForce RTX 2060 Super
    Sound Card
    onboard
    Monitor(s) Displays
    Two 27" Dell 4K monitors
    Screen Resolution
    3840 x 2160
    Hard Drives
    M.2 NVME SSD, 500 GB; Two 2TB Mechanical HDD's
    PSU
    850w PSU
    Case
    Cyberpower PC
    Cooling
    Water cooled
    Keyboard
    Backlit Cyberpower gamiong keyboard
    Mouse
    Backlit Cyberpower gaming mouse
    Internet Speed
    1 GB mbps
    Browser
    Brave
    Antivirus
    Windows Security
Terminal opens PowerShell, by default is on the right-click of the Windows Start button and has 2 choices.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
Anyone?

To clarify, I want to run the script as admin from the desktop with a right or double click
 

My Computers

System One System Two

  • OS
    W11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Me
    CPU
    12100F
    Motherboard
    MSI B660M-a wifi pro
    Memory
    32GB
    Graphics Card(s)
    rx580
    Monitor(s) Displays
    2 x 27" 4k
    Screen Resolution
    4k standard
    Hard Drives
    None, SSD and Nvme
  • Operating System
    win10 and 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    4 DIY desktops + one thinkpad
    CPU
    i7 2600k, i7 4790k, AMD 1100t, i7 8650u (thinkpad laptop)
    Memory
    16GB minimum
    Graphics card(s)
    RX480/580's
How do I run a ps1 script ... using run as admin in windows 11?
I want to run the script as admin ... with a right ... click

The Windows 10 method works in Windows 11 as well.
The RunAsAdmin context menu entry appears for ps1 files in all locations not just the Desktop.
Add 'Run as administrator' to PS1 File Context Menu - TenForumsTutorials
Its .reg files were updated in May 2021.

I had not noticed that the RunAsAdmin for ps1 files had disappeared on mine. I've just redone it using the 2021 .reg files and I've now got a RunAsAdmin context menu entry back for my ps1 files in Windows 11 & Windows 10 [Version 21H2 in both].


Denis
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
The Windows 10 method works in Windows 11 as well.
The RunAsAdmin context menu entry appears for ps1 files in all locations not just the Desktop.
Add 'Run as administrator' to PS1 File Context Menu - TenForumsTutorials
Its .reg files were updated in May 2021.

I had not noticed that the RunAsAdmin for ps1 files had disappeared on mine. I've just redone it using the 2021 .reg files and I've now got a RunAsAdmin context menu entry back for my ps1 files in Windows 11 & Windows 10 [Version 21H2 in both].


Denis
Thanks, that did it!
 

My Computers

System One System Two

  • OS
    W11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Me
    CPU
    12100F
    Motherboard
    MSI B660M-a wifi pro
    Memory
    32GB
    Graphics Card(s)
    rx580
    Monitor(s) Displays
    2 x 27" 4k
    Screen Resolution
    4k standard
    Hard Drives
    None, SSD and Nvme
  • Operating System
    win10 and 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    4 DIY desktops + one thinkpad
    CPU
    i7 2600k, i7 4790k, AMD 1100t, i7 8650u (thinkpad laptop)
    Memory
    16GB minimum
    Graphics card(s)
    RX480/580's
Back
Top Bottom