Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Programming
»
Powershell
»
Power shell
Power shell
Rate Topic
Display Mode
Topic Options
Author
Message
vijayarani87.s
vijayarani87.s
Posted Monday, October 01, 2012 3:19 AM
SSC Rookie
Group: General Forum Members
Last Login: Tuesday, February 19, 2013 4:21 AM
Points: 49,
Visits: 124
Hi guys,
I am new to powershell, can anyone please help me in undertanding powershell. I googled about powershell. But i dint get any clear idea about it.
I would like to know about, for what purpose we are using powershell.
And i need to use powershell for deployment. Please help me on this.
Post #1366411
BrainDonor
BrainDonor
Posted Monday, October 01, 2012 3:41 AM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 4:31 AM
Points: 1,400,
Visits: 6,892
A good starting point would be the Stairways series available on this site:
http://www.sqlservercentral.com/stairway/91327/
.
There is also the book "Learn Windows Powershell in a Month of Lunches".
BrainDonor
Linkedin
Post #1366434
Laerte Poltronieri...
Laerte Poltronieri...
Posted Monday, October 01, 2012 3:59 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Friday, April 19, 2013 10:29 AM
Points: 156,
Visits: 732
For me the best book ever on Posh V2 :
Windows PowerShell In Action 2d, Bruce Payette
$hell your Experience !!!
Post #1366454
opc.three
opc.three
Posted Monday, October 01, 2012 2:24 PM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 9:55 PM
Points: 6,720,
Visits: 11,759
vijayarani87.s (10/1/2012)
I would like to know about, for what purpose we are using powershell.
Three properties of a given task that compel me to use PowerShell or another managed programming language like C# or SSIS over using T-SQL to accomplish the same task:
1. The need to interact with a file system, e.g. deleting old files, renaming existing files, executing a program, etc. If you're considering using xp_cmdshell or one of the undocumented extended procedures like xp_dirtree, don't, explore using PowerShell or another managed programming language like C# or SSIS.
2. The need to interact with multiple database instances, e.g. gathering information about an environment where I want to run the same query against 1-
n
instances and compare or do something with the results. If you're thinking of using Linked Servers, don't, explore using PowerShell or another managed programming language like C# or SSIS.
3. The need to interact with a service outside the SQL database engine, e.g. Active Directory, a Web Service, SharePoint, etc. If you're thinking of using CLR or the OLE Automation procs, don't, explore using PowerShell or another managed programming language like C# or SSIS.
__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Believe you can and you're halfway there.
--Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler
--Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them.
--Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples.
--Giordy
Post #1366759
Jeff Moden
Jeff Moden
Posted Monday, October 01, 2012 4:05 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 2:32 PM
Points: 32,906,
Visits: 26,792
Heh... Or do like I do. Use xp_CmdShell to call PowerShell.
Of course, you should make sure you're system is properly locked down first.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1366813
opc.three
opc.three
Posted Monday, October 01, 2012 5:04 PM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 9:55 PM
Points: 6,720,
Visits: 11,759
Jeff Moden (10/1/2012)
Of course, you should make sure you're system is properly locked down first.
Properly locking down your system, what exactly do you mean by that?
__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Believe you can and you're halfway there.
--Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler
--Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them.
--Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples.
--Giordy
Post #1366828
Jeff Moden
Jeff Moden
Posted Monday, October 01, 2012 8:24 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 2:32 PM
Points: 32,906,
Visits: 26,792
opc.three (10/1/2012)
Jeff Moden (10/1/2012)
Of course, you should make sure you're system is properly locked down first.
Properly locking down your system, what exactly do you mean by that?
It's simple. Only the DBAs have SA privs and no non-DBA user or app has been given a proxy to execute xp_CmdShell directly. They can only do it through a stored procedure that can't even see the content of.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1366850
opc.three
opc.three
Posted Monday, October 01, 2012 10:01 PM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 9:55 PM
Points: 6,720,
Visits: 11,759
Jeff Moden (10/1/2012)
opc.three (10/1/2012)
Jeff Moden (10/1/2012)
Of course, you should make sure you're system is properly locked down first.
Properly locking down your system, what exactly do you mean by that?
It's simple. Only the DBAs have SA privs and no non-DBA user or app has been given a proxy to execute xp_CmdShell directly. They can only do it through a stored procedure that can't even see the content of.
Congratulations! You have boiled down 'Securing SQL Server' into less tHan 40 words!
The fact remains that enabling xp_cmdshell introduces risk into an environment and there simply is no reason one needs to enable it to manage a database.
For the original poster and any onlookers it is in your best interests to look beyond xp_cmdshell when evaluating how to solve an issue in SQL Server.
__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Believe you can and you're halfway there.
--Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler
--Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them.
--Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples.
--Giordy
Post #1366858
Jeff Moden
Jeff Moden
Posted Tuesday, October 02, 2012 6:42 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 2:32 PM
Points: 32,906,
Visits: 26,792
opc.three (10/1/2012)
[hrThe fact remains that enabling xp_cmdshell introduces risk into an environment and there simply is no reason one needs to enable it to manage a database.
That fact remains that you still have an unreasonable fear of it. Unless you've made the mistake of enabling a non-SA-prived individual to use it, only SA's can use if. If you have it turned off and you're apps have SA privs, the first thing an attacker will do is turn it on. It won't even slow the attacker down because he'll be expecting it.
BWAA-HAAA!!!! And there's nothing wrong with summarizing the security of SQL Server in 40 words or less. Many people apparently don't understand the basic idea of "only DBAs get SA". Perhaps the additional 11 words of "Don't forget to turn off the guest and builtin admin accounts" would help?
xp_CmdShell is useless in the hands of an attacker because, in a properly locked down system, he can't get his hands on it. You need to concentrate on properly locking down your system because that's the real problem.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1366989
opc.three
opc.three
Posted Tuesday, October 02, 2012 9:04 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 9:55 PM
Points: 6,720,
Visits: 11,759
Jeff Moden (10/2/2012)
opc.three (10/1/2012)
[hrThe fact remains that enabling xp_cmdshell introduces risk into an environment and there simply is no reason one needs to enable it to manage a database.
That fact remains that you still have an unreasonable fear of it.
Sorry, but that dog won't hunt. All steps taken to prevent the use of xp_cmdshell are well-rooted in reason. It continues to astonish me that you are such an ardent proponent of it. Not only does it introduce risk into an environment but it might be one of the single-worst design choices for application development on the SQL Server platform.
Unless you've made the mistake of enabling a non-SA-prived individual to use it, only SA's can use if.
You're assuming that we as database professionals will be able to foresee and dictate all actions taken by someone with rights to change Active Directory. In a vacuum xp_cmdshell is harmless. In the real world it's a security risk. In a "properly locked down system" xp_cmdshell is disabled.
__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Believe you can and you're halfway there.
--Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler
--Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them.
--Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples.
--Giordy
Post #1367105
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.