locked
Uninstall / Disable specific Powershell version 5.0 only RRS feed

  • Question

  • Hi,

    We are having PowerShell version 5.0 in server 2012 R2 and we have installed PowerShell 7.1.0 preview, now we want to restrict or block PowerShell version 5.0 only, if we uninstall  PowerShell feature / apply group policy it'll stop PowerShell, so we want only to uninstall / disable PowerShell 5.0. So please suggest. 

    Regards,

    Mani

    Thursday, May 7, 2020 6:17 PM

All replies

  • PowerShell is a required program for WS2012.  You cannot remove it or things may fail in the future.  

    You can use Group Policy to prevent all users from executing all but signed scripts.  

    PowerShell 7 is released but it is not the default PowerShell for current versions of Windows.  It cannot do many of the tasks that PS 5.1 can do so it is not a replacement.

    You should not be using a "Preview" version in production.  It is not intended to be used as a current system tool and may cause issues.


    \_(ツ)_/

    Thursday, May 7, 2020 6:26 PM
  • Hi Jrv,

    Thanks for your reply. 

    How to stop / restrict powershell version 5.0 only from Group Policy, we want to function Powershell 7 but only restrict the older version. currently we are doing testing in the test server only.

    Regards,

    Mani 

    Thursday, May 7, 2020 7:32 PM
  • How to stop / restrict powershell version 5.0 only from Group Policy, we want to function Powershell 7 but only restrict the older version.

    Why would you like to do that? You can run both versions next to each other without problems. 

    Live long and prosper!

    (79,108,97,102|%{[char]$_})-join''

    Thursday, May 7, 2020 9:09 PM
  • Hi BOfH, Is it possible to block or not only specific version through group policy ? Regards, Mani
    Friday, May 8, 2020 3:16 AM
  • You can use Group Policy to block access to the PS executable by specific users and groups.  Post in GP forum to learn how to do this.

    There is really ne reason to block access to PS for users.  They cannot use it to do anything that they are not allowed to do.  DO you block access to CMD, WMI, notepad or other system programs?  Why is it seen as necessary to do this?  It makes more sense to s[pend time hardening the security of you systems and network correctly rather than taking superstitious steps that you probably heard about on the Internet.

    PS 7 is not a replacement for PS releases and cannot be used the same way other than explicitly.


    \_(ツ)_/

    Friday, May 8, 2020 3:28 AM