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 123»»»

Day Zero with PowerShell Expand / Collapse
Author
Message
Posted Tuesday, May 10, 2011 12:01 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, February 12, 2013 12:54 PM
Points: 41, Visits: 120
Comments posted to this topic are about the item Day Zero with PowerShell

@SQLvariant
I have a PowerShell script for you.
Post #1105861
Posted Tuesday, May 10, 2011 12:49 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 10:11 PM
Points: 1, Visits: 86
Should there be a space in the "Set-ExecutionPolicy RemoteSigned" command?
Post #1105886
Posted Tuesday, May 10, 2011 3:24 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, April 10, 2014 8:11 AM
Points: 126, Visits: 187
Thomas - yes. Also "ft -a" instead of "ft-a" in the example script.

Other than that, finally got me going with PowerShell - thanks Aaron!
Post #1105957
Posted Tuesday, May 10, 2011 4:39 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, February 12, 2013 12:54 PM
Points: 41, Visits: 120
Yes, there whould definitely be a space.

Sorry, the editor isn't properly rendering the code that I posted.


@SQLvariant
I have a PowerShell script for you.
Post #1105998
Posted Tuesday, May 10, 2011 8:17 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, April 07, 2014 8:40 AM
Points: 55, Visits: 294
This is great...just great...

One of the excuses obstacles for not getting started with PowerShell has been just getting things set up to be able to actually use the thing. This seemed to be a secret passed among an elite priesthood in dark misty passage ways. Not a place for mere mortals to tread.

Now, along comes Aaron Nelson and puts everything in a single, easy to digest article.
You've totally blown my excuse to not use PowerShell! Sheesh.

Ok, seriously. Nice article, Aaron. It is very nice to have the requirements assembled in one place.

Thank you!



Post #1106156
Posted Tuesday, May 10, 2011 8:42 AM


SSC-Dedicated

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

Group: Administrators
Last Login: Today @ 1:49 PM
Points: 32,768, Visits: 14,929
Added spaces into the code. Should look fine now.






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1106178
Posted Tuesday, May 10, 2011 8:56 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, February 12, 2013 12:54 PM
Points: 41, Visits: 120
DJ (5/10/2011)
Nice article, Aaron. It is very nice to have the requirements assembled in one place.

Thank you!


Thanks DJ, glad you liked it. There should be more 'good reasons' to use PowerShell coming out very soon


@SQLvariant
I have a PowerShell script for you.
Post #1106200
Posted Tuesday, May 10, 2011 3:15 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 1:07 PM
Points: 59, Visits: 115
Thanks DJ. Can you maybe explain the purpose of the Set-ExecutionPolicy command? Also, when I tried the sample code, I got an error when trying to restart a server which I manually stopped:

Start-Service : Service 'SQL Server Agent (SQL2008) (SQLAgent$SQL2008)' cannot be started due to the following error: Cannot open SQLAgent$SQL2
008 service on computer '.'.
At line:6 char:14
+ Start-Service <<<<
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand
Post #1106533
Posted Tuesday, May 10, 2011 6:08 PM


SSC-Insane

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

Group: General Forum Members
Last Login: Today @ 11:47 AM
Points: 20,455, Visits: 14,068
Thanks much for all of these tips.



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 #1106582
Posted Tuesday, May 10, 2011 7:18 PM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, February 12, 2013 12:54 PM
Points: 41, Visits: 120
For running the example script you will probably need to elevate your shell (I keep forgetting that I have a pre-emptive work-around in place for this). Just hold down the Ctrl + Shift Keys and then click on the shortcut for the ISE. Then run the script in that window.

I'll work on getting a Summary for the Execution Policies however your best/most complete answer is in the Help files. June does a good job with those.


@SQLvariant
I have a PowerShell script for you.
Post #1106591
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse