Juszeil Conception

Juszeil Conception

  • 主 頁
  • 部 落 格
  • 相 簿
  • 關 於
  • 更 新 資 訊
  • 網站地圖

«2015 - 3»
日一二三四五六
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
TODAY

Hide Banner | LOGIN
2023-3-24 |

BLOG 部落格

Total found 1 articles on 2015-3-6.

銵 2015-3-6 23:43:42

Windows Server - enable inheritance on all AD user accounts

Enabling inheritance on AD accounts typically required one to check the include inheritable permissions checkbox on the Security Tab > Advanced screen in ADUC on every user account one at a time. 

include inheritable permissions from this object's parent

Solution: PowerShell can be used to enable permissions inheritance on a large group of AD user accounts.
1) Open a PowerShell prompt (Run as administrator) on a Domain Controller. Then perform the following PowerShell commands:
Import-Module ActiveDirectory
 
$users = Get-ADUser -ldapfilter (objectclass=user) -searchbase ou=companyusers,dc=enterpriseit,dc=co
ForEach($user in $users)
{
    # Binding the users to DS
    $ou = [ADSI](LDAP:// + $user)
    $sec = $ou.psbase.objectSecurity
 
    if ($sec.get_AreAccessRulesProtected())
    {
        $isProtected = $false ## allows inheritance
        $preserveInheritance = $true ## preserver inhreited rules
        $sec.SetAccessRuleProtection($isProtected, $preserveInheritance)
        $ou.psbase.commitchanges()
        Write-Host $user is now inherting permissions;
    }
    else
    {
        Write-Host $User Inheritable Permission already set
    }
}
 

Relate Post : Windows Server - Active Directory: LDAP Syntax Filters Windows Server 2012 - Converting from a Server Core to Server with GUI Windows Server - DFS 甇亙儔 Windows Server - IIS and X-Forwarded-For Header (behide Proxy or LB) Windows Server - Tuning replication performance in DFSR configured RD Session Host server with TS license server Windows Server - How to Determine the Minimum Staging Area of DFSR Windows Server 2012 Install and Configure Remote Desktop Services Windows Server - Manage RDS RemoteApp with Windows PowerShell Windows 2008 - Clean up Winsxs after SP1 install
Comments :
No Comments

Post your comment:


Post your comment by Guest :
Verify Code :


Back To Top

Find Me

Powered By 2013-2015 ©. Juszeil Conception version 2.0
Queries Executed : 0.0127 seconds