FrankysWeb / Disbale-RemotePowerShell

Disable RemotePowerShell for all users except Active Directory Group

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable-RemotePowerShell.ps1

This script disables RemotePowerShell for all users except members of a specific AD group.

Usage

  • Create an AD group e.g. "AllowRemotePowerShell".
  • Change line 2 of this script to your AD group
  • Run this script:
.\Disable-RemotePowerShell.ps1

Create Windows Scheduler Task

  • Create a Windows Scheduler Task to run this script every day

Tested Exchange / Windows Server Versions

  • Exchange Server 2019
  • Windows Server 2022

Website

FrankysWeb

About

Disable RemotePowerShell for all users except Active Directory Group

License:MIT License


Languages

Language:PowerShell 100.0%