SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Pioneering with PowerShell


Pioneering with PowerShell

Author
Message
Kevin Mao
Kevin Mao
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 30
I find Powershell can do almost everything. I just try to generate PDF or excel from Reporting service via web service call from Powershell.

I use Sql agent to run powershell on production. How do you usually scheudle PowerShell script? What are pros and cons?
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (112K reputation)SSC Guru (112K reputation)SSC Guru (112K reputation)SSC Guru (112K reputation)SSC Guru (112K reputation)SSC Guru (112K reputation)SSC Guru (112K reputation)SSC Guru (112K reputation)

Group: General Forum Members
Points: 112264 Visits: 18624
Nicholas Cain (6/23/2012)
Huge push for PowerShell and yet PASS completely screwed the pooch with the lack of PowerShell sessions at this years Summit with a precon, a spotlight and another regular session.


Yes - there could have been more.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Revenant
Revenant
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18026 Visits: 5069
RBarryYoung (6/24/2012)
Phil Factor (6/24/2012)

Jeff, if you think that PowerShell is equivelent to VBA/VBScript, then you haven't tried PowerShell hard enough. Sure, you can convert from VB to PowerShell, but PowerShell does so much more...


Agreed. I find Powershell to be surprisingly set-oriented for such a procedural/operational language. In many ways it's the most SQL-like language Microsoft has ever released to production. (besides actual SQL of course... :-D )

For the most SQL-like language released by Redmond, try SCOPE.
peter-757102
peter-757102
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2819 Visits: 2559
Not having worked with it, I did read some articles last year and was totally horrified by the language specifics and couldn't phantom somone getting language basics so wrong! A language needs to be precise and absolutely clear in its meaning, yes even scripting languages, but powershell code can be interpreted in many ways, most of them seem reasonable and useful in some situations, but only one is actually what it will do. That in itself constitutes a major fail I will argue here (I feel the same about perl for example)

I would absolutely HATE to be forced to use such languages, but for some reason some people adore cryptic and mystic languages and confuse them for powerful. I always seen this as soem sort of cult factor!

The mystic part will disapear if you know all the exact details and pay extreme attention to every letter, but at that point a scripting lanuage in my view already has failed!
chrisn-585491
chrisn-585491
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 6016 Visits: 2651
My main wish is that instead of creating YAPL (Yet Another Programming Language), Redmond could have leveraged a non-cryptic scripting language like Python. I enjoy learning, but the number of different language I need to accomplish my normal daily tasks is ridiculous!
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (384K reputation)SSC Guru (384K reputation)SSC Guru (384K reputation)SSC Guru (384K reputation)SSC Guru (384K reputation)SSC Guru (384K reputation)SSC Guru (384K reputation)SSC Guru (384K reputation)

Group: General Forum Members
Points: 384390 Visits: 43063
peter-757102 (6/26/2012)
Not having worked with it, I did read some articles last year and was totally horrified by the language specifics and couldn't phantom somone getting language basics so wrong! A language needs to be precise and absolutely clear in its meaning, yes even scripting languages, but powershell code can be interpreted in many ways, most of them seem reasonable and useful in some situations, but only one is actually what it will do. That in itself constitutes a major fail I will argue here (I feel the same about perl for example)

I would absolutely HATE to be forced to use such languages, but for some reason some people adore cryptic and mystic languages and confuse them for powerful. I always seen this as soem sort of cult factor!

The mystic part will disapear if you know all the exact details and pay extreme attention to every letter, but at that point a scripting lanuage in my view already has failed!


+1. I couldn't have said it better myself.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Revenant
Revenant
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18026 Visits: 5069
chrisn-585491 (6/26/2012)
My main wish is that instead of creating YAPL (Yet Another Programming Language), Redmond could have leveraged a non-cryptic scripting language like Python. I enjoy learning, but the number of different language I need to accomplish my normal daily tasks is ridiculous!

Redmond supports Python in Visual Studio 2012. It is up to developers whether it will get traction.

Edit: spelling 'developers'.
chojrak11@gmail.com
chojrak11@gmail.com
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 73
I have already written some proof of concept application that can be extended using PowerShell scripting, and also using IronPython at the same time. Embedding PowerShell requires no more than dozen additional lines in your app, same for IronPython.

Of course if you want to share some meaningful application state/features then you need to write proper classes and surrounding logic, but I found it to be very intuitive and easy (and I don't make living with everyday programming).

Just remember that classes, properties and methods you want to be available in scripts must be public. I've lost couple of hours until I found this.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search