Windows 10: Block PowerShell and CMD for standard users

Discus and support Block PowerShell and CMD for standard users in Windows 10 Software and Apps to solve the problem; Hello,In our organization we need to restrict our users from either running scripts in PowerShell and CMD or to block them completely. However admins... Discussion in 'Windows 10 Software and Apps' started by Mario Karp, Jul 22, 2024.

  1. Block PowerShell and CMD for standard users


    Hello,In our organization we need to restrict our users from either running scripts in PowerShell and CMD or to block them completely. However admins should be able to run scripts or open these apps after running them as administrator.We tried to use AppLocker but the apps get blocked for both standard users and administrators. When we allow admins in AppLocker policy it is still blocked.I also tried implementing "Turn on Script Execution" option under "Administrative Templates\Windows Components\Windows PowerShell" in Intune configuration profile and powershell script gets blocked when is sav

    :)
     
    Mario Karp, Jul 22, 2024
    #1

  2. CMD and PowerShell

    Hi Andre,

    I did all items you listed.

    After reboot, running CMD and powershell (admin) had the same result ("no app associated"). So I turned the feature off in taskbar settings.

    Regards,

    Danker
     
    dschaareman, Jul 22, 2024
    #2
  3. gvannucci Win User
    UAC & standard users with additional privileges

    I am marking this problem as solved. The problem was:

    Allow a standard user to enable/disable a network without having to enter a password every time.

    My solution for Windows 7 was:

    1. Add the standard user to the "Network Configuration Operators" group.
    2. Login as the standard user.
    3. Create a shortcut to the network adapter.
    4. Right-click on the shortcut to see or change the state of the network adapter.

    I have received many useful and instructive suggestions on Tenforums. Based on those suggestions,
    here's my solution for Windows 10:

    1. Add the standard user to the "Network Configuration Operators" group.
    2. Login as the standard user.
    3. In a cmd window, run this command
    netsh interface show interface
    to learn the name of the network adapter.
    4. Run Task Scheduler using the password of the standard user.
    5. Create two shortcuts in accordance with Option 2 in this tutorial:
    Elevated Shortcut without UAC - TenForumsTutorials
    -- at Step 3, name the shortcuts something like “EnableLAN” and “DisableLAN”
    -- at Step 7, in the Program/script field, type netsh
    -- at Step 8, into the Add arguments field, type
    interface set interface "name of network adapter" admin=enable
    (Make the last element “disable” for the second task.)
    -- at Step 14, name the shortcuts something like “Turn LAN On” and “Turn LAN Off”
    6. Press the Win + R keys to open the Run dialog, type ncpa.cpl into Run, and click OK to open the Network Connections window. Keep this window open on your desktop to see the state of the network adapter. The color of the icon reflects the state of the adapter.
    7. Click on one or the other of the two newly-created shortcuts to change the state of the network adapter. A cmd window briefly flashes on the screen. This can be eliminated using the procedure mentioned by Try3 in a previous post, if desired.

    The solution for Windows 10 is much more cumbersome than the solution for Windows 7. I have to stop using Windows 7 due to the end of Microsoft support, and this is not the first time that I find Windows 10 to be less user friendly than Windows 7.

    Thanks, again, to all who have kindly given me help and advice
     
    gvannucci, Jul 22, 2024
    #3
  4. Block PowerShell and CMD for standard users

    CMD and PowerShell Closing after a couple of seconds, CMD and Powershell closing.

    My Laptop is fine i didnt download any viruses, Didnt mess with system files nor modify it. After a normal restart, A message that pops up for half a second saying "This app wont work on this computer" Or something like that (The messages appears and disappears too fast its hard to make out the text) and the cmd icon appears for a split second in the taskbar. I searched for fixes and i got told to use the sfc /scannow command to scan for possibly corrupted or missing files.

    I opened CMD and ran the command but it just closes after a few seconds. I tried not inputing any commands and it still did. I tried running it on Powershell and turns out it also closes. I recorded a video of me doing it.

    And I have followed several steps to fix my laptop, One of them is like :

    1. Follow the instructions on this site You Can See, the instructions I've followed ,Like :

    • download and install the tool called Autoruns.
    • Download Media Creation Tool from Microsoft.
    But, after I followed this, there is still no change on my laptop.

    And how can i recover the command processor folder and does that help with my with cmd problem? If not, How can i fix my cmd?
     
    Muhammad Fathur Rahman Wijaya, Jul 22, 2024
    #4
Thema:

Block PowerShell and CMD for standard users

Loading...
  1. Block PowerShell and CMD for standard users - Similar Threads - Block PowerShell CMD

  2. Block PowerShell and CMD for standard users

    in AntiVirus, Firewalls and System Security
    Block PowerShell and CMD for standard users: Hello,In our organization we need to restrict our users from either running scripts in PowerShell and CMD or to block them completely. However admins should be able to run scripts or open these apps after running them as administrator.We tried to use AppLocker but the apps...
  3. Block PowerShell and CMD for standard users

    in Windows 10 Gaming
    Block PowerShell and CMD for standard users: Hello,In our organization we need to restrict our users from either running scripts in PowerShell and CMD or to block them completely. However admins should be able to run scripts or open these apps after running them as administrator.We tried to use AppLocker but the apps...
  4. Are Powershell same as CMD?

    in Windows 10 Gaming
    Are Powershell same as CMD?: seems to do the saAME https://answers.microsoft.com/en-us/windows/forum/all/are-powershell-same-as-cmd/0afdbbb0-6edb-4ef2-9b64-07b63e698c55
  5. Block script execution for standard user.

    in AntiVirus, Firewalls and System Security
    Block script execution for standard user.: How to restrict standard user from executing scripts and to provoke windows admin credential to execute them? https://answers.microsoft.com/en-us/windows/forum/all/block-script-execution-for-standard-user/07fc9889-22e4-4258-8292-abaafd50be01
  6. Block script execution for standard user.

    in Windows 10 Gaming
    Block script execution for standard user.: How to restrict standard user from executing scripts and to provoke windows admin credential to execute them? https://answers.microsoft.com/en-us/windows/forum/all/block-script-execution-for-standard-user/07fc9889-22e4-4258-8292-abaafd50be01
  7. Block script execution for standard user.

    in Windows 10 Software and Apps
    Block script execution for standard user.: How to restrict standard user from executing scripts and to provoke windows admin credential to execute them? https://answers.microsoft.com/en-us/windows/forum/all/block-script-execution-for-standard-user/07fc9889-22e4-4258-8292-abaafd50be01
  8. CMD and Powershell RUSH

    in Windows 10 Network and Sharing
    CMD and Powershell RUSH: Hi mods,My Windows 10 is running cmd and power shell automatically even though I didn't open them. Some errors are popping up and browsers are closing automatically. I captured the picture with my phone because it also freezes my pc mouse. Please help....
  9. Powershell and cmd no network

    in Windows 10 Ask Insider
    Powershell and cmd no network: I got my windows from school try to install choco package manager or adding the repo to power shell . non are working as its saying that there is no internet on both cmd and powershell tried ping and curl its the same. But my browser and other apps have great network . Is...
  10. CMD and PowerShell

    in Windows 10 BSOD Crashes and Debugging
    CMD and PowerShell: Hi all, I run Windows 10, v 1803. Clicking Start, typing CMD, there is only "Command Prompt (desktop application)". Win key + X shows "Windows PowerShell" and "Windows PowerShell (Admin)". If after Win key+R I choose Windows PowerShell" pops up a message: Same with...