Expand your Powershell mind – Three key cmdlets

25 June,2013 by Jack Vamvas

Most DBAs have fallen into step with Powershell via running scripts to manage the SQL Server instances . The first script I wrote in 2008 – to parse SQL Server Error Logs – and return anything interesting , is an example of such a maintenance script, but I didn't start learning Powershell in-depth until I revised my approach to learning Powershell.

I’ve since written a whole bunch of Powershell scripts and use Powershell for all sorts of maintenance and automation tasks.

It was until I decided to get deeper into Powershell and invest some serious time in learning that I realized a similar approach is required as learning SQL Server  - using BOL.

So I decided to focus and explore on three Powershell cmdlets – that are the gateway to exploring Powershell and getting into the flexibility and power.

 

1)       Get-Help -  Displays help about Windows PowerShell cmdlets and concepts.

2)       Get-Member  - Displays help about Windows PowerShell cmdlets and concepts.

3)       Get-Command - Gets basic information about cmdlets and other elements of Windows PowerShell

These three Powershell cmdlets , combined with Get-psdrive and Get-Process   , can lead you into some interesting areas . Master these cmdlets and you will use them repeatedly

Read More

Powershell Scripts for DBA

I want to become a DBA. What should I first learn ?

 


Author: Jack Vamvas (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Expand your Powershell mind – Three key cmdlets


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer