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

Pioneering with PowerShell Expand / Collapse
Author
Message
Posted Monday, June 25, 2012 12:39 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 8, 2012 1:57 PM
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?
Post #1320837
Posted Monday, June 25, 2012 2:15 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 7:33 AM
Points: 21,620, Visits: 15,276
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1320875
Posted Monday, June 25, 2012 2:40 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 9:02 AM
Points: 4,422, Visits: 3,415
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... )

For the most SQL-like language released by Redmond, try SCOPE.
Post #1320888
Posted Tuesday, June 26, 2012 2:56 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, August 7, 2014 4:27 AM
Points: 324, Visits: 2,212
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!
Post #1321098
Posted Tuesday, June 26, 2012 7:38 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, August 18, 2014 10:23 AM
Points: 640, Visits: 1,630
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!
Post #1321225
Posted Tuesday, June 26, 2012 8:10 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:57 AM
Points: 36,944, Visits: 31,447
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1321260
Posted Tuesday, June 26, 2012 8:51 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 9:02 AM
Points: 4,422, Visits: 3,415
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'.
Post #1321291
Posted Wednesday, June 27, 2012 11:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 6, 2014 3:37 AM
Points: 3, Visits: 48
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.

Post #1322062
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse