-
The IT Departments of 2010
Posted on August 28th, 2008 No comments
Print
Here’s an article from CIO.com, titled Tech Departments in 2010: Hot Jobs, Cold Skills, which basically talks about the skills that will be in greatest demand in 2010 and also those that are most likely to be outsourced and automated.
According to the article, IT departments in 2010 will be filled with ‘versatilists,’ which the article defines as “those with a technology background who also know the business sector inside and out, can architect and carry out IT plans that will add business value, and can cultivate relationships both inside and outside the company.”
The funny thing is I was just reading Chapter 6 of “The World is Flat 3.0” on the bus on my way home tonight and the section on “The Great Adapters” (pages 293-297 of the paperback edition) is very similar to what this article is about. The term ‘versatilist’ is also mentioned here and this was the first time I’ve heard of the term so that really caught my eye when I saw CIO.com’s homepage. Weird.
Anyway, check out the article, it’s a pretty good read.
-
How to query Active Directory using SQL Server
Posted on August 25th, 2008 10 comments
Print
Here is one of those things that I wish I had known much sooner. Very useful and a big time saver. I just found out about this a few months ago when I wanted to run a report against AD to see if the account info are consistent and up to date, to see which accounts have passwords set to never expire, when they were created/last updated, etc.
So I asked myself whether it’s possible to query AD directly from SQL. The first thing I did was do a search on Google of course and sure enough I found this website with instructions on how to do it!
Here are the steps:
1. Create a linked server to AD using this command in Query Analyzer:
sp_addlinkedserver ‘ADSI’, ‘Active Directory Service Interfaces’, ‘ADSDSOObject’, ‘adsdatasource’
2. Create views using the example below, I’m calling them vADUsers and vADGroups (replace calazan and com with your domain, add more AD attributes to the view as needed):
CREATE VIEW vADUsers AS
SELECT *
FROM OPENQUERY (ADSI,
‘SELECT co, whenCreated, whenChanged, sAMAccountName, sn, givenName, displayName, mail, telephoneNumber, mobile,
physicalDeliveryOfficeName, facsimileTelephoneNumber, title, department, company, manager, ipPhone, userAccountControl, badPwdCount
FROM ”LDAP://DC=calazan,DC=com”
WHERE objectCategory = ”Person” AND objectClass = ”user”’)CREATE VIEW vADGroups AS
SELECT *
FROM OPENQUERY (ADSI,
‘SELECT displayName, groupType, mail, name, info, whenChanged, whenCreated
FROM ”LDAP://DC=calazan,DC=com”
WHERE objectClass = ”group”’)3. Query the views just like you’re querying a normal SQL table:
I also recommend that you download the free ADSI Edit tool (adsiedit.msc) to see all the attributes available in your Active Directory site. Microsoft Office Communications Server 2007 and Exchange Server 2007 for example extend the AD schema and you might want to query some of those extra attributes as well.



Recent Comments