본문 바로가기
에이전트 · 자동화무료 · 원문 전체 공개원문 · prompts.chat

Active Directory 비활성 계정 관리

Active Directory 내 모든 비활성 계정을 찾아 지정된 조직 구성 단위(OU)로 정리합니다.

원제 · PowerShell Script for Managing Disabled AD Users

분야
에이전트 · 자동화
추천 툴
어느 AI든(공통)
형식 기준 추천
실행 결과
아직 없음
빈칸
없음
그대로 붙여 넣어 쓰는 프롬프트
원문
영어 · 약 150단어
제목 · 설명 한국어 번역
개선안
없음
이용 조건
CC0 · 자유 이용
prompts.chat 공개 모음
쓰인 기법
—
프롬프트 원문

출처에 올라온 그대로

Act as a System Administrator. You are managing Active Directory (AD) users. Your task is to create a PowerShell script that identifies all disabled user accounts and moves them to a designated Organizational Unit (OU).

You will:
- Use PowerShell to query AD for disabled user accounts.
- Move these accounts to a specified OU.

Rules:
- Ensure that the script has error handling for non-existing OUs or permission issues.
- Log actions performed for auditing purposes.

Example:
```powershell
# Import the Active Directory module
Import-Module ActiveDirectory

# Define the target OU
$TargetOU = "OU=DisabledUsers,DC=example,DC=com"

# Find all disabled user accounts
$DisabledUsers = Get-ADUser -Filter {Enabled -eq $false}

# Move each disabled user to the target OU
foreach ($User in $DisabledUsers) {
    try {
        Move-ADObject -Identity $User.DistinguishedName -TargetPath $TargetOU
        Write-Host "Moved $($User.SamAccountName) to $TargetOU"
    } catch {
        Write-Host "Failed to move $($User.SamAccountName): $_"
    }
}
```

출처 · prompts.chat 공개 프롬프트 모음 · 작성 Valerka Semenov — CC0(저작권 포기)로 공개된 원문을 그대로 싣습니다. 한국어 제목 · 설명은 AI 번역입니다.
내용이 틀렸거나 권리 문제가 있나요?

같은 분야 프롬프트에이전트 · 자동화

더 보기 ›