Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Microsoft SQL Server 2008 Administration with Windows PowerShell
This is the forum to discuss the Wrox book Microsoft SQL Server 2008 Administration with Windows PowerShell by Ananthakumar Muthusamy, Yan Pan ; ISBN: 978-0-470-47728-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Microsoft SQL Server 2008 Administration with Windows PowerShell section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 21st, 2010, 11:37 AM
Registered User
 
Join Date: Jun 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Question on

I'm a powershell newbie and having a problem with an example in the book. On page 177 the script at the bottom:

Code:
PS H:\> get-wmiobject -class win32_service -computername MyComputer | where-object{ ($_.name -like 'SQLSERVERAGENT') }.changestartmode('manual')
It says:

"Method invocation failed because [System.Management.Automation.ScriptBlock] doe
sn't contain a method named 'changestartmode'.
At line:1 char:125
+ get-wmiobject -class win32_service -computername MyComputer | where-object{ ($_
.name -like 'SQLSERVERAGENT') }.changestartmode <<<< ('manual')
+ CategoryInfo : InvalidOperation: (changestartmode:String) [], R
untimeException
+ FullyQualifiedErrorId : MethodNotFound"

What do I need to be looking at to figure out what is wrong? Thanks for any help.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Disappearing UserName & Question within Customized PasswordRecovery Question Template eddiemcham ASP.NET 3.5 Basics 13 June 13th, 2009 04:23 AM
Question aspcoder BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 May 15th, 2009 04:46 PM
One more question!! mike_remember ASP.NET 1.0 and 1.1 Professional 10 October 26th, 2006 03:01 PM
thanks but i have another question antony maiky CSS Cascading Style Sheets 1 August 20th, 2006 03:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.