By using this site, you agree to the Privacy Policy.
Accept
EnterinITEnterinITEnterinIT
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
Reading: All OUs in this domain should be protected from accidental deletion
Font ResizerAa
EnterinITEnterinIT
Font ResizerAa
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
  • WINDOWS
  • SCCM Query Collection List
Search
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
Windows Server

All OUs in this domain should be protected from accidental deletion

Published: February 18, 2024
2 Min Read
SHARE

All OUs in this domain should be protected from accidental deletion.

Contents
With Active Directory Users and Computers consoleWith Windows PowerShell

All OUs in this domain should be protected from accidental deletion.

Severity: Warning

Problem: Some organizational units (OUs) in this domain are not protected from accidental deletion.

Impact: If all OUs in your Active Directory domains are not protected from accidental deletion, your Active Directory environment can experience disruptions that might be caused by accidental bulk deletion of objects.

Resolution:Make sure that all OUs in this domain are protected from accidental deletion.

Best Practices Analyzer

With Active Directory Users and Computers console

To “protect an OU from accidental deletion”, do the following:

  1. Open Active Directory Users and Computers console;
  2. Right click the OU that you want to protect from accidental deletion, and click Properties;
  3. Go to the tab Object, check “Protect object from accidental deletion” and click OK.

NOTE: If you don’t see the Object tab you must enable Advanced Features. In the Active Directory Users and Computers, console click View and select Advanced Features.

With Windows PowerShell

1. Run Windows PowerShell as Admin on Domain Controller;

2. Type the following to list all OU’s where the option “Protect object from accidental deletion” is disabled:

Get-ADOrganizationalUnit -filter * -Properties ProtectedFromAccidentalDeletion | where {$_.ProtectedFromAccidentalDeletion -eq $false} | ft

3. Enter the following command in PowerShell:

Get-ADOrganizationalUnit -filter * -Properties ProtectedFromAccidentalDeletion | where {$_.ProtectedFromAccidentalDeletion -eq $false} | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $true

4. To verify all OU’s are modified, enter this command in PowerShell:

Get-ADOrganizationalUnit -filter * -Properties ProtectedFromAccidentalDeletion | where {$_.ProtectedFromAccidentalDeletion} | ft

5. The column ProtectFromAccidentalDeletion should be True in all lines.

TAGGED:Active DirectoryMicrosoft Windows ServerPowerShellWindowsWindows Server 2012R2Windows Server 2016Windows Server 2019
Previous Article How to Migrate WSUS Database between two SQL Servers
Next Article Edge 79
Leave a Comment Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translation

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
by Transposh - translation plugin for wordpress

Popular Posts

System Requirements for Windows Server 2016
Windows Server
Configuration Manager Query Collection List
Configuration Manager Query Collection List
ConfigMgr
Structured/Managed Navigation enabled on Modern Pages in Classic Team Sites
Tech
SCCM Failed to get DP locations as the expected version from MP
ConfigMgr

Recent Posts

Installing and Configuring Fail2ban for SSH Protection on Ubuntu 24.04
Linux
Enabling and Configuring FirewallD on AlmaLinux
Linux
User Creation and SSH Key Setup in AlmaLinux
Linux
How to reset password on AlmaLinux
Linux

© 2023 EnterinIT

Go to mobile version
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?