First I want to point out that I am very new to SharePoint. I have recently been hired as a SharePoint administrator, developer and content maintainer. Fortunately my new employer is willing to train me and realizes that it will take some time for me to reach the "expert" level with all this new (to me) technology. I bring nearly thirty years of development experience, primarily with Microsoft products but others as well so learning new things has just been part of my life since I can remember.
Okay, with that out of the way here is the scenario. I want to document our SharePoint 2010 implementation in a repeatable way that stores the resultant information to a persistent data store (my preference would be SQL Server). This way I can compare what it is this week to what it was last week and so on. I plan to start fairly small but eventually want to include some detailed information. Particularly about the security structure because we have a real hodgepodge of security with some set in AD and other set in SharePoint. Permissions applied to users at all levels as well as both AD and SharePoint groups. My goal with this is to both get a useful product and to help me learn the underpinnings of SharePoint.
I started writing some PowerShell scripts but quickly realized that I was writing code using the Microsoft.SharePoint assemblies and all of the logic structures. I started to wonder if all of this could be done in C# so I started investigating what it would take to be able to fire up Visual Studio and write a C# program to gather all of the information I want and write it to a complex database structure.
All of this is what lead me to these questions:
- Can I do everything I want in C# using the SharePoint assemblies to get to the information I need?
- Is the full functionality of the SharePoint PowerShell cmdlets available in the SharePoint assemblies?
- Can I write to a SQL Server DB from a PowerShell script?
- Which would you use?
All insight will be welcomed.
I realize that these are very general and open ended questions and if this is not the appropriate place for them then please let me know where I should pose them and I will happily move this post.