Creative Commons License
Drekendrop | Blog of Tutorial by Mei Pakpahan is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at drekendrop.blogspot.com.
Permissions beyond the scope of this license may be available at http://softdadesign.co.nr.

Friday, March 11, 2011

SQL Query: Retrieve Active Directory Users List

Today i was struggling getting the active directory users list from our domain, but finally it worked. Here's the query.

1st step---


EXEC master.dbo.sp_addlinkedserver @server = N'ADSI',
@srvproduct=N'Active Directory Services', @provider=N'ADsDSOObject',
@datasrc=N'bisdragons.com'
GO

Note: Change @datasrc=N'your_domain.com' 

2nd step--- 
Run this query:
SELECT samAccountName, givenName [First Name], sn [Last Name],mail FROM OPENQUERY(ADSI,'SELECT samAccountName,givenName, sn, mail FROM ''LDAP://OU=Teaching Faculty,OU=Staff,DC=BISDRAGONS,DC=COM'' WHERE objectClass=''Person'' AND objectClass = ''User'' ORDER BY samAccountName') WHERE mail IS NOT NULL

Note: change "LDAP://OU=your_organizational_unit, DC=your_domain,DC=COM(*optional com,org,ca,etc...)" 

You can also modify the SQL query above to get another attributes from your Active Directory. This link provides a complete Active Directory attributes in pdf.

Good luck!


Thursday, March 10, 2011

SharePoint 2010: Change Preferred Name To FirstName + LastName Instead Of Domain\Username

In this tutorial i would like to share how to change your account preferred name in SharePoint Server 2010.

1st step---
Log on to SharePoint Central Administration as Farm Administrator.

2nd step---
Go to Application Management > Manage service applications.


3rd step---
Scroll down to User Profile Service Application and click on the hyperlink.

4th step---
Go to  Manage User Profiles.


6th step---
Put the username that you would like to change its profiles on to Find profiles textbox. Then click Find. Once it shows the result, rollover to the Account Name and click the little arrow, choose Edit My Profile.


5th step---
Now you can Edit the account properties, don't forget to Save and Close after you're finished editing. Good luck!

Wednesday, March 9, 2011

SharePoint 2010 Error: Requested registry access is not allowed

Did you find this error? Well i just did few hours ago, and after struggling many hours, i think i finally have found what the problem is. The first issue came because i did repair my SharePoint site, because i did a mistake by changing the farm account and suddenly my SharePoint Central Administration page can not be accessed. So, after i repaired my SharePoint using SharePoint Server 2010 installation CD, my Central Administration worked fine. But wait, it wasn't fine at some pages, like i couldn't access Security > General Security > Configure managed accounts. It returned me an error :
Error: Requested registry access is not allowed

and not even that i couldn't delete or edit any of my web applications, and i couldn't access all my SharePoint site or web applications, it says my license has expired. So what was going on? After surfing on the internet and tried to find a bunch of articles about it, finally i found the way to figure it out.

Below are some steps that i did:
--1st step
Open the registry by run regedit on the server where the SP2010 is installed.

--2nd step
Go to HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\OFFICE SERVER\14.0
Right click and choose Permission..

--3rd step
Add WSS_ADMIN_WPG and give Full permission to this Group.

--4th step
Add WSS_WPG and give Read permission to this Group.

--5th step
Restart the server.

Try to browse Central Administration again. And it should be working fine as well as your SharePoint sites.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Grants For Single Moms