Users and Roles
Managing users and roles is a big topic and this section won't cover everything. We aim to show you different problems that have come up and how we solved them.
Example: The following command returns the security commands available.
Users
Managing users should be a pretty straight forward task. While the User Manager provided by Sitecore is handy, you'll likely find yourself wanting to make bulk changes. The following examples should give you a few ideas about how to manage user accounts.
Query users and update properties
Example: The following generates a batch of test users in the default domain with the out-of-the-box user profile template. The users are then queried filtering on the name.
In case you forgot to set the user profile for accounts, we have a solution for that.
Example: The following queries a user and sets the profile template. Note that changing the profile template requires the user to be authenticated.
Example: The follow queries all the user accounts for the default provider and filters those over the age of 18. The age property is custom on the Profile. Finally, export to CSV.
Active Directory
When using the Active Directory module you may need to increase the setting LDAP.SizeLimit
if you wish to return all Active Directory accounts.
Using Set-User
to update AD accounts may result in an "Access denied message"; this is due to the fact that the account querying user does not have write access to profile properties or the profile provider is not configured properly.
Roles
Example: The following queries roles using the specified identity.
Item Access Control Lists (ACL)
The ACL commands provide an automated way of granting privileges to items.
Example: The following creates a new ACL and assigns to an item.
References
Last updated