Prompt · IT Specialists
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.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
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.
Follow-up prompts
- How can I ensure the script handles errors gracefully during execution?
- Can you suggest modifications to make the script work for a larger number of machines?
- What logging mechanisms should I implement to track script performance?