To open Windows PowerShell as an administrator in Windows 11, follow these steps:
Open the Start menu and type "PowerShell" into the search bar.
Right-click on the "Windows PowerShell" result and select "Run as administrator" from the context menu.
If prompted, click "Yes" to allow the app to make changes to your device.
Hold down the Windows key and press X to open the Power User menu. Then, select "Windows PowerShell (Admin)" from the menu.
Press the Windows key + R to open the Run dialog, and then type "powershell" into the text field.
Next, hold down the Ctrl + Shift keys and press Enter to run the command as an administrator.