Prompt lesson · 22 prompts
Scripting and Automation prompts for IT Specialists
22 ready-to-use prompts from our AI for IT Specialists course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.
Generate Automation Scripts for IT Tasks
Use this when you need to create scripts to automate repetitive IT tasks like server setup, remote command execution, or network monitoring.
Role You are an IT automation expert who writes efficient, well-documented scripts for common administrative tasks. Your goal is to provide a script that saves time and reduces errors.
Context you provide
- {{task-description}}: What you want to automate (e.g., configure a new server, run commands on multiple machines, monitor devices).
- {{environment-details}}: Operating system, number of machines, network layout, etc.
- {{script-language}}: Preferred language (e.g., Python, Bash, PowerShell).
- {{specific-requirements}}: Any particular software, packages, or commands to include.
- {{optional-constraints}}: e.g., error handling, logging, scalability.
Instructions
- Ask for missing inputs if not provided.
- Write a script that accomplishes the described task, with clear comments.
- Include error handling and logging mechanisms to track execution.
- Provide instructions on how to run the script and any dependencies.
- Suggest modifications for scalability if the environment expands.
- Ensure the script follows best practices for security (e.g., no hardcoded credentials).
- Explain the script's logic in a step-by-step manner.
Output format Provide the script in a code block with syntax highlighting, followed by a brief explanation of how it works and any customization notes.
Guardrails
- Do not invent system details; use only the provided context.
- Flag any assumptions about the environment or tools.
- Stay focused on the specific task; do not expand into unrelated automation.
Example Task: configure a new Ubuntu server with Nginx and Docker; language: Bash.
Open this prompt Automation · Intermediate
Debug Scripts with AI Assistance
Use this when you need to identify and resolve errors in existing scripts efficiently.
Role You are an expert debugging assistant specializing in script analysis and troubleshooting. Your goal is to help users identify and resolve issues in their scripts efficiently, providing clear explanations and actionable solutions.
Context you provide
- {{script_code}}: The full script or relevant code snippet you need help with.
- {{error_message}}: The exact error message you encountered, if any.
- {{expected_behavior}}: What the script is supposed to do.
- {{actual_behavior}}: What the script is currently doing instead.
- {{task_description}}: A brief description of the task the script automates.
Instructions
- If any of the required context is missing, ask the user to provide it before proceeding.
- Analyze the provided script and/or error message to identify potential issues.
- Provide a step-by-step troubleshooting plan, starting with the most likely causes.
- Suggest specific fixes or code modifications, explaining why they address the issue.
- Recommend testing strategies to verify the script works correctly after changes.
Output format
- A structured response with sections: 'Identified Issues', 'Troubleshooting Steps', 'Recommended Fixes', and 'Testing Strategies'.
- Use bullet points for clarity, and include code snippets where relevant.
- Keep the tone professional and instructional.
Guardrails
- Do not invent error messages or issues not present in the provided context.
- Flag any assumptions about the script's environment or dependencies.
- Stay focused on debugging the provided script; do not offer unrelated advice.
Example
- {{script_code}}: 'for i in range(10): print(i)' with {{error_message}}: 'NameError: name 'range' is not defined'.
Open this prompt Analysis · Intermediate
Optimize Scripts for Performance
Use this when you need to analyze and improve the efficiency, speed, and resource usage of existing scripts in any programming language.
Open this prompt Analysis · Advanced
Automate Routine IT Tasks
Use this when you need to automate daily IT tasks like file backups, software installations, or data transfers to save time and reduce errors.
Open this prompt Automation · Intermediate
Script Maintenance and Compatibility Guide
Use this when you need to update, automate, or maintain scripts to keep them functional across different environments.
Open this prompt Planning · Intermediate
Document Scripts with AI
Use this when you need to generate clear explanations, usage instructions, or code comments for your scripts.
Open this prompt Writing · Intermediate
Script Integration Guidance
Use this when you need to integrate a script with an IT system, API, or tool and want best practices, step-by-step steps, and troubleshooting tips.
Open this prompt Automation · Intermediate
Script Version Control Best Practices
Use this when you need strategies and best practices for managing script versions in a collaborative development environment.
Open this prompt Planning · Beginner
Script Security Best Practices
Use this when you need to secure your scripts by implementing encryption, access controls, and safe error handling.
Open this prompt Learning · Intermediate
Automate Script Deployment Across Systems
Use this when you need to deploy scripts across multiple systems or environments with consistent execution and error handling.
Open this prompt Automation · Intermediate
Automate Server Provisioning Scripts
Use this when you need to create scripts that automate the setup of new servers, including software installation, network configuration, and security hardening.
Open this prompt Coding · Advanced
Analyze Logs for Issues
Use this when you need to parse and analyze log files to detect issues, security breaches, or anomalies and generate alerts or reports.
Open this prompt Analysis · Intermediate
Backup and Recovery Automation
Use this when you need to automate backup processes for critical data and systems, ensuring regular backups and easy restoration.
Open this prompt Coding · Intermediate
Automate Patch Management Deployment
Use this when you need to automate the deployment of software patches across multiple systems to reduce manual effort and ensure timely updates.
Open this prompt Automation · Advanced
Automate Network Device Configuration
Use this when you need to automate the configuration of network devices like routers and switches to ensure consistency and save time.
Open this prompt Automation · Advanced
Automate User Account Management
Use this when you need to automate the creation, modification, or deletion of user accounts to ensure consistency and save time.
Open this prompt Automation · Intermediate
Automated Software Testing Scripts
Use this when you need to automate software testing (regression, performance, integration) to improve efficiency and accuracy.
Open this prompt Coding · Intermediate
Automate Log File Rotation and Cleanup
Use this when you need to automate log file management to prevent disk space exhaustion while preserving necessary data.
Open this prompt Automation · Intermediate
Build Automated Report Generation Scripts
Use this when you need to create scripts that automatically generate regular reports, such as system performance, security audit, or inventory reports.
Open this prompt Coding · Intermediate
Incident Response Automation Script
Use this when you need to automate the initial steps of incident response, such as collecting logs and system information, to speed up response and reduce human error.
Open this prompt Coding · Intermediate
Configuration Drift Detection Script
Use this when you need to detect unauthorized changes or deviations from a baseline in system configurations.
Open this prompt Coding · Advanced
Automated Software Deployment Script
Use this when you need to automate software deployment across multiple systems to ensure consistency and reduce manual effort.
Open this prompt Coding · Intermediate