Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Windows Server 2008 : Retrieving Information About Objects with dsget, Viewing and Modifying AD Permissions with dsacls

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
12/19/2012 4:04:55 PM

Retrieving Information About Objects with dsget

You can use the dsget command to retrieve information about objects. The dsget command is useful when you want to get a list of group members or user group membership.

Tip

The primary difference between dsquery and dsget is that dsquery retrieves multiple objects that meet a given criteria, while dsget retrieves information about a single object.


dsget CommandComments
Get a list of members for a group.
dsget group DN -members
C:\>dsget group "cn=it admins,
ou=east, ou=sales, dc=pearson,
dc=pub" -members

Retrieves a list of members of the IT Admins group in the sales\east OU. Figure 8-2 shows the result of this command.
List group membership for a user.
dsget user dn [-memberof
-expand]
C:\>dsget user "cn=joe,
ou=east, ou=sales, dc=pearson,
dc=pub" -memberof
C:\>dsget user "cn=joe,
ou=east, ou=sales, dc=pearson,
dc=pub" -memberof -expand

The -memberof switch shows the direct group membership for a user. The -expand switch includes nested group membership.

For example, consider the Domain Users group, which is a member of the Users group. If a user is added to the Domain Users group, the user is indirectly a member of the Users group.

The -memberof switch shows the Domain Users group but not the Users group, unless the -expand switch is also included.

Figure 8-3 shows the result of this command.



Figure 1. Using dsget to view group members

Figure 2. Using dsget to view user group membership


Viewing and Modifying AD Permissions with dsacls

Every object in Active Directory Domain Services (AD DS) has an access control list (DS ACL), which is a list of access control entries (ACE). Each ACE includes the security identifier (SID) of an account and the permission. This is the same as in the Security tab of any AD DS object within Active Directory Users and Computers (ADUC), as shown in Figure 3.

Figure 3. Viewing permissions in ADUC

Figure 3 shows the permissions assigned to the East OU. Even though these permissions are assigned by SID, ADUC does a lookup into ADUC to identify and display the user and group names.

Tip

The Security tab does not show by default. If it isn’t showing, select View and Advanced Features to enable the Security tab (and other advanced features).


dsacls CommandComments
Show permissions for an object.
dsacls dn
C:\>dsacls "ou=east,ou=sales,
dc=pearson,dc=pub"

You can view the permissions on any AD DS object simply by entering dn after dsacls. The example shows the permission on the sales\east OU.
Reset default permissions.
dsacls dn -resetdefaultdacl
C:\>dsacls "ou=east,ou=sales,
dc=pearson,dc=pub" –resetdefaultdacl

If you made a mistake when modifying permissions on an object, you can always return it to the original permissions with the -resetdefaultdacl switch.

Note

You can do much more with the dsacls command, but it’s rare that you need to do so with a script. For example, you can use an in-depth command to grant a group permission to change passwords for users in an OU. However, it’s much easier to do so using the Delegation of Control wizard access in ADUC by right-clicking over any OU and selecting Delegate Control.

Other -----------------
- Microsoft Systems Management Server 2003 : NTFS Security
- Microsoft Systems Management Server 2003 : Standard and Advanced Security
- System Center Configuration Manager 2007 : Network Design - Use of BITS
- System Center Configuration Manager 2007 : Network Design - Fast Networks and Slow Networks
- Collaborating Within an Exchange Environment Using Microsoft Office SharePoint Server 2007 : Customizing and Developing MOSS Sites
- Collaborating Within an Exchange Environment Using Microsoft Office SharePoint Server 2007 : Exploring End-User Features in MOSS
- SQL Server 2008 R2 : Executing Stored Procedures
- SQL Server 2008 R2 : Advantages of Stored Procedures, Creating Stored Procedures
- Microsoft Dynamics CRM 4.0 : Silverlight - Deploying Silverlight Using IFrames, Notes Entity
- Microsoft Dynamics CRM 4.0 : Silverlight - Developing a Basic Silverlight Application
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer