Although you can use SQL Server Management Studio or T-SQL to manage AlwaysOn, SQL Server Denali CTP 3 includes 25 cmdlet which together provide complete coverage for creating, confiiguring and administering the AlwaysOn database feature. In this post we’ll look at using Powershell to perform various management tasks for AlwayOn. Read more
If you ever need to flatten out groups which may include nested local and AD groups there’s a really easy way to do this in the System.DirectoryServices.AccountManagement.GroupPrincipal GetMembers method. Here’s some PowerShell code which works against both local and AD groups. The code can easily be adapted into a… Read more
I’ve spent some time trying to get the SMO Transfer class to bend to my will. I want to script out all objects of a certain type or a select list of objects. As we will see a moment this was a bit a of challenge and it wasn’t until… Read more
I’ve taken a few hours to try out Denali CTP 3 sqlps and noticed some welcome changes. The biggest change for sqlps is that it has been implemented as module and plain old Powershell host–It’s no longer mini-shell!
SQLPS is now regular Powershell host implemented as the familiar… Read more
While working on a PowerPack for PowerGUI I needed to create a bunch of icon files from bitmaps files so I started with a quick web search. I didn’t find any PowerShell scripts suited to the task, but did find an excellent C# WinForm by Haresh Ambaliya:
Although the… Read more
Today on July 1st 2011, I was pleasantly surprised to be recoginzed as a Microsoft Most Valuable Professional for contributions to the PowerShell technical communities:
To the many who have helped me, Microsoft, and the PowerShell community, thank you!
This is old news, but I’ve had to explain SQL Server VM licensing to enough people recently that I thought I’d put together a post.
In June 2009, Microsoft released an update to SQL Server licensing which can significantly lower TCO for SQL Server instances running under VMs for not… Read more
A first step in any disaster recovery planning is inventorying your database servers. Although having having an up-to-date list of SQL Servers sounds simple enough the reality is in an… Read more
As a follow up to my SQLRally 2011 Scripting Guy Guest Blog Post which dealt with Excel and Access files, this post explorers working with delimited text files using the ACE driver.
What about Import-CSV?
One of the first things I do when working with PowerShell is first look at… Read more
Ed Wilson (Blog|Twitter) aka Scripting Guy has series of SQL Server related posts the week of May 2nd 2011 including my guest blog post. The post, Use ACE Drivers and PowerShell to Talk to Access and Excel, demonstrates querying Excel and Access files from PowerShell… Read more
If live in Central/South Florida or are planning a trip, we’ve got several IT community events worth checking out…
In part 1 I provide an overview of concept of IT Camp, how the plan was developed by borrowing ideas from similar events, and how we did on venue, sponsors and attendees. In this blog post I provide more details on overall event feedback.
SharePoint, PowerShell and SQL topped… Read more
On Saturday, March 19th 2011 we held the first ever Saturday “code camp” style event for the IT Pro (Sys Admins) community which we called IT Camp. IT Camps are a free, one day learning event for anyone seeking professional development. This event serves IT professionals and students with a… Read more
I presented a one hour session at Tampa IT Camp on SQL Server PowerShell Extensions (SQLPSX): “In this session we will look at how the CodeProject SQLPSX can be used for real world PowerShell automation. Specific topics covered include using ADO.NET, retrieving SQL Server information, SSIS administration, Policy-Based… Read more
When approaching an automation problem the first questions you must answer is whether you should even invest the time to write a script. There are scenarios where it just isn’t worth your time. Depending on the tools available to you even the task of scripting out every database object could… Read more
I was recently asked a question on restoring a database using PowerShell with the following requirements
- Take a database backup file i.e. DatabaseName.bak
- Derive the database name from the backup file name
- Disconnect any user connected to the database
- Relocate (move) the physical files to SQL Serve r instance the…