Windows 10: I am trying to run Powershell with administrator but it wont let me right click and I cant...

Discus and support I am trying to run Powershell with administrator but it wont let me right click and I cant... in Windows 10 Gaming to solve the problem; I am not able to run windows PowerShell as well as other things as administrator.... Discussion in 'Windows 10 Gaming' started by Zaakarii, Feb 21, 2024.

  1. Zaakarii Win User

    I am trying to run Powershell with administrator but it wont let me right click and I cant...


    I am not able to run windows PowerShell as well as other things as administrator.

    :)
     
    Zaakarii, Feb 21, 2024
    #1
  2. pepanee Win User

    Run PowerShell Script As An Administrator

    Hi. So I've been searching online on a way to do this yet I cannot find a way to do it.

    _______________________________________

    I need this in specific:

    I want to double click a PowerShell script file (which will run as an administrator) from Windows Explorer that has this as the script:
    Set-MpPreference -DisableRealtimeMonitoring $true

    (that script requires that PowerShell needs to be run as an administrator)
    _______________________________________

    So those are the restrictions:
    No right-click>run PowerShell as an administrator
    No opening a shortcut to PowerShell (as an administrator) and pasting the command


    Thanks
     
    pepanee, Feb 21, 2024
    #2
  3. ddelo Win User
    Export All Administrative Events to Excel

    To analyze events, from the Windows Event Viewer, there is a simple way to export all Administrative Events to Excel, with PowerShell.

    Exporting all Administrative Events to Excel is a simple two Step process, as described here:

    Step 1 - Create the Administrative Events View .xml file
    1. Open Eventviewer (%windir%\system32\eventvwr.msc)
    2. Navigate to: Event Viewer (Local) > Custom Views > Administrative Events
    3. In the “Actions” pane select “Filter Current Custom View”.
    4. Select the the XML tab.
    5. Press Ctrl+A to select all the XML code of the Custom View.
    6. Open a notepad, paste the selected code and save the file to your Desktop as AdmEvtView.xml


    Step 2 - Create the csv file with the events
    1. Download the ExportEvtCSV.zip file, which contains the script ExportEvtCSV.ps1 and unzip it, on your Desktop.
      It's not a fancy script, just basic PowerShell commands to create a csv file on the Desktop.
    2. In Windows Search, type “ISE” (without the quotes) to open “Windows PowerShell ISE” and Run as administrator
    3. To allow running the script, change the ExecutionPolicy, for this session. To do that, in the Console pane type:
      Code:
    4. In the Windows PowerShell ISE, open and run the script: ExportEvtCSV.ps1
      The script will create a csv file with a name YYYYMMDD.HHMM.csv on the Desktop
    5. When done, open the newly created .csv file, format the columns as needed and optionally save it as .xlsx, if you wish.
    That’s it! You now have all the Administrative Events in Excel for filtering and further analysis. I am trying to run Powershell with administrator but it wont let me right click and I cant... :)

    Now to the more technical hard stuff... *Confused

    There is a reason for running the script from within PowerShell ISE!

    It would be great if everything was also working perfectly, when running the script from an elevated PowerShell too.

    We can run it from an elevated PowerShell, which means that you just follow the Step 1, as above but for the Step 2 instead of the ISE you run the script from an elevated PowerShell.

    The problem is that it will work only for anybody who has en-US format for the dates. Everyone else, who has another format (i.e. en-GB, fr-FR, el-GR etc.), the dates are not translated properly by Excel (although the script uses the –UseCulture switch) and remain as text in the en-US format.

    I'm not sure if this a bug of the "export-csv" cmdlet, but although it runs the way it supposed to from within the ISE, from PowerShell there is a problem with the dates format.
    As I haven’t found a way to overcome this obstacle, any suggestion from the PowerShell gurus of the forum (like my good friend Shawn @Brink, for instance), is welcome.
     
    ddelo, Feb 21, 2024
    #3
  4. Mike-77 Win User

    I am trying to run Powershell with administrator but it wont let me right click and I cant...

    Can't run Powershell or cmd.exe as administrator

    I've tried different ways to open PowerShell and cmd.exe. When I search in the toolbar and left click on either, they'll open. If I right click on either and click "Run as administrator", nothing happens. I've also tried opening them in the Quick Access
    Menu but can't. I noticed something weird with the Quick Access Menu. I can't open everything that's in the box. I can't open the following:

    Event Viewer

    Device Manager

    Disk Management

    Computer Management

    PowerShell

    PowerShell (Admin)

    Task Manager

    File Explorer

    When I click on any of the above, the box closes, but nothing happens (the other items listed in the box open normally). If I do a search for the above items, I'll find them, click on them, they open. PowerShell will open, but won't open if I right click
    it and try to open it as administrator.

    I went into UAC and moved the slider down, nothing changed, still couldn't open PowerShell or cmd.

    I haven't tried creating a new user account yet.
     
    Mike-77, Feb 21, 2024
    #4
Thema:

I am trying to run Powershell with administrator but it wont let me right click and I cant...

Loading...
  1. I am trying to run Powershell with administrator but it wont let me right click and I cant... - Similar Threads - trying run Powershell

  2. I am trying to run Powershell with administrator but it wont let me right click and I cant...

    in Windows 10 Software and Apps
    I am trying to run Powershell with administrator but it wont let me right click and I cant...: I am not able to run windows PowerShell as well as other things as administrator. https://answers.microsoft.com/en-us/windows/forum/all/i-am-trying-to-run-powershell-with-administrator/538d8c8e-49e7-4de4-a697-483d5956054b
  3. I am trying to run Powershell with administrator but it wont let me right click and I cant...

    in Windows 10 Gaming
    I am trying to run Powershell with administrator but it wont let me right click and I cant...: I can't run anything in administrator and it wont show the "Open file location" or "Run as administrator" https://answers.microsoft.com/en-us/windows/forum/all/i-am-trying-to-run-powershell-with-administrator/b5eba4a1-2080-47b2-9de8-4bfa37bd4e48
  4. I am trying to run Powershell with administrator but it wont let me right click and I cant...

    in Windows 10 Software and Apps
    I am trying to run Powershell with administrator but it wont let me right click and I cant...: I can't run anything in administrator and it wont show the "Open file location" or "Run as administrator" https://answers.microsoft.com/en-us/windows/forum/all/i-am-trying-to-run-powershell-with-administrator/b5eba4a1-2080-47b2-9de8-4bfa37bd4e48
  5. I am trying to reset my computer and it wont let me

    in Windows 10 Gaming
    I am trying to reset my computer and it wont let me: The problem when I try resetting my computer it says something like a There was a problem when restarting no changes were made each time. https://answers.microsoft.com/en-us/windows/forum/all/i-am-trying-to-reset-my-computer-and-it-wont-let/3975ff4d-3f42-427b-be72-0e1596fa7239
  6. I am trying to reset my computer and it wont let me

    in Windows 10 Software and Apps
    I am trying to reset my computer and it wont let me: The problem when I try resetting my computer it says something like a There was a problem when restarting no changes were made each time. https://answers.microsoft.com/en-us/windows/forum/all/i-am-trying-to-reset-my-computer-and-it-wont-let/3975ff4d-3f42-427b-be72-0e1596fa7239
  7. I am trying to reset my computer and it wont let me

    in Windows 10 Customization
    I am trying to reset my computer and it wont let me: The problem when I try resetting my computer it says something like a There was a problem when restarting no changes were made each time. https://answers.microsoft.com/en-us/windows/forum/all/i-am-trying-to-reset-my-computer-and-it-wont-let/3975ff4d-3f42-427b-be72-0e1596fa7239
  8. Can’t right click and run as administrator

    in User Accounts and Family Safety
    Can’t right click and run as administrator: Hi Even tried the built in administrator account, but when e.g.I right click on notepad and select run as administrator, nothing happens. Is there a solution to this ? Please thanks 179924
  9. I am the administrator of my pc but id doesn't let me open apps as an administrator or let...

    in Windows 10 BSOD Crashes and Debugging
    I am the administrator of my pc but id doesn't let me open apps as an administrator or let...: a pop up shows up that says windows cannot access the specified device https://answers.microsoft.com/en-us/windows/forum/all/i-am-the-administrator-of-my-pc-but-id-doesnt-let/04f91092-300a-407d-934f-f7c674e32159
  10. administrator wont let me install a programme

    in Windows 10 Customization
    administrator wont let me install a programme: administrator wont let me install a programme https://answers.microsoft.com/en-us/windows/forum/all/administrator-wont-let-me-install-a-programme/58880408-c574-4ccb-9df3-a7519782ffc7