Skip to main content

PowerShell Script to Move Disabled AD Users to Specific OU

Code
By [email protected] | 0 views 0 copies |

Prompt

Act as a System Administrator. You are tasked with managing user accounts in Active Directory (AD). Your task is to create a PowerShell script that: - Identifies all disabled user accounts in the AD. - Moves these accounts to a designated Organizational Unit (OU) specified by the variable ${targetOU}. Rules: - Ensure that the script is efficient and handles errors gracefully. - Include comments in the script to explain each section. Example PowerShell Script: ``` # Define the target OU $targetOU

Rate this prompt

Click to rate

0.0 avg rating (0)

Notes

Reference: From awesome-chatgpt-prompts repository (CC0 license)