So, tomorrow marks one year since I started blogging here on SQL Server 365 and what a year it has been. I can honestly say that I have taken a great deal away from this experience which has been so rewarding, the only disappointment I have is that I didn't start blogging earlier.
I set out with the goal of blogging something I had learned about SQL Server every day for a year which I soon found out was a little too optimistic. I do however still feel very satisfied with what I have achieved and happy that people have taken something away from my posts so far. After all the main reason for me starting the blog was to give something back to the fantastic SQL Community which has given me so much over the years. You really are fantastic!
So here you go the SQL Server 365 First Year In Numbers!
Site Hits - 7,974
Total Posts - 62
Total Comments - 39
Top 5 Posts
Don't be a Balloon - 1676 Views
SQL Server Error Logs - 907 Views
Determining Active Directory Group Membership - 242 Views
Database Mirroring Error - 151 Views
A Script A Day - Day 16 - Database Restore - 99 Views
Top 5 Countries
United States - 3587 Views
United Kingdom - 1461 Views
India - 324 Views
Russia - 235 Views
Germany - 227 Views
Top 5 Browsers
Internet Explorer - 3051 Views
Chrome - 1949 Views
Firefox - 1939 Views
Safari - 381 Views
Opera - 244 Views
Top 5 OS's
Windows - 6411 Views
Macintosh - 413 Views
Linux - 232 Views
iPhone - 232 Views
Android - 191 Views
I have some great ideas for next year and among other posts plan to do a series on Indexing, share a maintenance routine I've been working on and provide a plethora of scripts on Mirroring, Snapshots to name a few. I will even be delving into the world of Powershell and how it helps ease the pain of a fail-over in the event of invoking DR!
If there is anything you would like me to to do a post on or would like to do a guest post then please get in touch and we can arrange it! ckwmcgowan@gmail.com or @ckwmcgowan
Happy New Year!
Chris
Chris McGowan's SQL Server perspicuity, for all things SQL related and some, no doubt, not!
Monday, 31 December 2012
Wednesday, 19 December 2012
Active Directory Group Membership and Powershell
I’ve done my fair share of work with Active Directory
over the years and LDAP has helped immensely, it did however let me down
recently. Well when I say LDAP let me
down it was probably my knowledge of LDAP (or lack thereof) that let me down.
For an audit I needed to list all groups a random set of
users where members of. After struggling
for an hour or so I decided to admit defeat with LDAP and instead turn to a
trusty friend of mine Powershell, and It didn’t let me down!
I downloaded ActiveRoles Management Shell for Active
Directory from Quest (see the link below);
Launching this I ran Get-Command to display a list of all
available cmdlets;
From the extensive list of cmdlets I used get-qadmemberof
and piped this to the out-file cmdlet to write the results to c:\sql\username.txt
get-qadmemberof ‘domain\username' | out-file c:\sql\username.txt
Voila! With one simple line of code for each of the
random users I was able to get the results, sweet.
Enjoy!
Chris
Subscribe to:
Posts (Atom)