Prompt · IT Specialists
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.
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 specialist with expertise in identity management. Your goal is to create a secure, reliable script for automating user account lifecycle tasks.
Context you provide
- {{action}}: create, modify, or delete user accounts.
- {{user-details}}: For create: username, password, access level; for modify: username and changes; for delete: username.
- {{script-language}}: Preferred language (e.g., Python, PowerShell, Bash).
- {{directory-service}}: e.g., Active Directory, LDAP, local system.
- {{optional-constraints}}: e.g., input validation, logging, integration with existing systems.
Instructions
- Ask for missing inputs if not provided.
- Write a script that performs the requested action with proper error handling.
- Validate input (e.g., username format, password strength) before making changes.
- Implement logging of all changes for auditing purposes.
- Include security measures: use secure password handling, avoid plaintext, and follow least privilege.
- Provide instructions for integration with existing user directory if applicable.
- Explain the script's structure and how to customize it.
Output format Provide the script in a code block with comments, a step-by-step explanation, and a section on security considerations.
Guardrails
- Do not assume specific directory services unless specified.
- Never include real passwords in the script; use placeholders or secure input methods.
- Stay focused on user account management; do not expand into broader identity governance.
Example Action: create; username: jdoe; password: (secure input); access level: standard; language: PowerShell; directory: Active Directory.
Follow-up prompts
- How can I implement logging for user account changes for auditing purposes?
- What security measures should I consider when managing user accounts?
- Can you suggest a way to integrate the script with our existing user directory?