0

C#(.NET 4.0)を使用して、特定のユーザーグループのAD(Active Directory、Windows Server 2008 R2)OUのオプションを設定List Contentしたいと思います。List Object

Microsoftに従ってgPOptionsとプロパティを設定することができましたが、との設定方法の例が見つかりませんでした。他の2つのプロパティの設定は、次のように機能します。gPLinkList ContentList Object

[...]

byte[] binaryForm = new byte[ groupPrincipal.Sid.BinaryLength ];
groupPrincipal.Sid.GetBinaryForm( binaryForm, 0 );
IdentityReference identityReference =
    new SecurityIdentifier( binaryForm, 0 );
PropertyAccessRule propertyAccessRule =
    new PropertyAccessRule(
        identityReference,
        AccessControlType.Allow,
        PropertyAccess.Read,
        new Guid( "...value provided by MSDN link..." ) );
...
// ouEntry is of type DirectoryEntry
ouEntry.ObjectSecurity.AddAccessRule( propertyAccessRule );
ouEntry.CommitChanges();

...
// Same for gPLink with the corresponding GUID

さらに情報が必要な場合はお問い合わせください。

4

1 に答える 1

0

List contentList object設定を少し変える必要があります。

...
ActiveDirectoryAccessRule activeDirectoryAccessRule =
    new ActiveDirectoryAccessRule(
        identityReference,
        ActiveDirectoryRights.ListChildren | ActiveDirectoryRights.ListObject,
        AccessControlType.Allow,
        ActiveDirectorySecurityInheritance.None );
...

これは、上記の質問のようにActiveDirectoryAccessRule対応するものに追加する必要があります。DirectoryEntry

于 2013-01-16T14:05:02.800 に答える