- Home
- MCP servers
- PowerShell Exec
PowerShell Exec
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"dynamicendpoints-powershell-exec-mcp-server": {
"command": "mcp",
"args": [
"run",
"mcp_powershell_exec"
]
}
}
}You have a secure MCP server that lets you execute PowerShell commands in a controlled, non-interactive way. It supports timeouts, blocks dangerous actions, outputs JSON-formatted results, and can generate enterprise scripts for management platforms like Microsoft Intune and IBM BigFix. This server is designed for safe automation and policy-driven script execution inside your MCP environment.
How to use
To use this server with an MCP client, run the MCP server process and then issue tool calls from your client. You can start the server from your MCP client interface using the standard run command, or by invoking the Python entry point directly if you are operating in a local environment.
Common start methods you can use from your MCP client are:
- Start the server via the MCP CLI with the server name you choose, e.g. run a powershell execution MCP server through the standard run command.
How to install
Prerequisites you need before installation are Python 3.7 or newer and a suitable runtime environment.
Manual installation steps you can follow:
# Install the package in editable mode for development
pip install -e .
# Or install the released package
pip install .
Starting the server in different environments
You can start the server in multiple ways depending on your environment and tooling.
From the MCP client: use the standard run command for the MCP server you installed.
From Python directly: run the module entry point to start the server locally.
Available tools
run_powershell
Execute PowerShell code securely with timeout support and restricted surface area to prevent dangerous commands.
get_system_info
Retrieve system information using Get-ComputerInfo with optional property filtering.
get_running_services
Query Windows services with optional name and status filters.
get_processes
Monitor processes with filtering, top-N, and sorting options.
get_event_logs
Access Windows event logs with filtering by log name, level, and count.
generate_script_from_template
Generate PowerShell scripts from predefined templates with parameter substitution.
generate_custom_script
Create custom PowerShell scripts from descriptive inputs with optional logging and error handling.
generate_intune_detection_script
Generate Intune detection scripts that include proper exit codes and logging.
generate_intune_remediation_script
Generate Intune remediation scripts with system restore points and error handling.
generate_intune_script_pair
Produce matched detection and remediation script pairs for Intune deployments.
generate_bigfix_relevance_script
Generate BigFix relevance scripts to determine if computers need action.
generate_bigfix_action_script
Create BigFix action scripts to perform remediation or configuration changes.
generate_bigfix_script_pair
Produce both relevance and action scripts as a matched pair for BigFix fixlet deployment.