Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Me, myself and Powershell Expand / Collapse
Author
Message
Posted Wednesday, December 07, 2011 10:35 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, April 18, 2014 6:27 AM
Points: 6,997, Visits: 8,411
hemanth.damecharla (12/7/2011)
Automating daily tasks is not only easy with Posh but, fun as well

Chad Miller's MSCS code on poshcode site is a wonderful starting point if you want to get a hang of WMI. I would like to thank Chad for posting this particular piece of code http://poshcode.org/2886.

I tried it as challenge to get all the data in one shot (Cluster, Groups, Resources and resource types), it was an awesome feeling when I was able to do it. After that, you can build a hash with the data; add some methods and vallah, you don't have to look at cluster admin console again

PowerShell is aptly named.


I can't stress the FUN part enough.
There is indeed a whole bunch of practical info and great samples out there.
Chad is one of the people posting on a regular basis and knowing his stuff.
Thank you for the feedback.


Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #1218121
Posted Wednesday, December 28, 2011 6:14 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 8:41 AM
Points: 48, Visits: 266
Oftentimes folks applaud PowerShell for things, and I see that those things can be done and automated just as easily in t-sql. I am looking for a list of PowerShell stuff that CANNOT be done in SQL, and that a DBA can find handy. One example I can think of is accessing non-SQL performance counters. Anything else useful for a DBA?
Post #1227305
Posted Thursday, December 29, 2011 12:50 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, April 18, 2014 6:27 AM
Points: 6,997, Visits: 8,411
e.g.
- setting startup parameters if your service account doesn't have local sysadmin at windows level.
- granting auth at windows level ( e.g. to push backup files to a safe zone )
- are you using SMO to configure sqlserver things ?

you name it, you got it.


Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #1227665
Posted Thursday, December 29, 2011 4:15 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 8:41 AM
Points: 48, Visits: 266
ALZDBA (12/29/2011)

- setting startup parameters if your service account doesn't have local sysadmin at windows level.

- Cool.

ALZDBA (12/29/2011)

- granting auth at windows level ( e.g. to push backup files to a safe zone )

- xp_cmdshell

ALZDBA (12/29/2011)
- are you using SMO to configure sqlserver things ?

- No, no need. I use sqlserver (SSMS/T-SQL) to configure sqlserver things
Post #1227712
Posted Thursday, December 29, 2011 7:53 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, April 18, 2014 6:27 AM
Points: 6,997, Visits: 8,411
pkrudysz (12/29/2011)
ALZDBA (12/29/2011)

- setting startup parameters if your service account doesn't have local sysadmin at windows level.

- Cool.

ALZDBA (12/29/2011)

- granting auth at windows level ( e.g. to push backup files to a safe zone )

- xp_cmdshell

ALZDBA (12/29/2011)
- are you using SMO to configure sqlserver things ?

- No, no need. I use sqlserver (SSMS/T-SQL) to configure sqlserver things


Of course you can do it all manually, time and again.

You are correct, xp_cmdshell can take you a long way.

Powershell only provides the means to hook up to more than just what's available in DOS (xp_cmdshell) and vbscript.
That means for many systems people, that don't program e.g. c#.net, .. they have to learn only one language syntax, hook up to their target namespace and use that software's proper methodes to configure whatever needed.







Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #1227789
Posted Thursday, January 05, 2012 11:09 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, April 18, 2014 6:27 AM
Points: 6,997, Visits: 8,411
Please allow me to point to a very interesting project at codeplex:

Scripted PowerShell Automated Deployment Engine (SPADE) for SQL Server

pre-configure windows, install sql, post install scripts, ....


Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #1230990
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse