How to enable TCP IP and Named Pipes using command line

Zahid Ahamed
Zahid Ahamed used Ask the Experts™
on
Hi,
I am trying to enable TCP/IP and Named Pipes using the following command. But I have encountered the error:--

WMIC /NAMESPACE:\\root\Microsoft\SqlServer\ComputerManagement10 PATH ServerNetworkProtocol Where ProtocolName=’Np’ CALL SetEnable

Please see the attachment.

Thanks
Capture.PNG
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AlexA lack of information provides a lack of a decent solution.

Commented:
What version of SQL are you running

WMIC /NAMESPACE:\\root\Microsoft\SqlServer\ComputerManagement10 is for SQL 2008

To access WMI Control

On the taskbar, click Start, and then click Control Panel.

Double-click the Administrative Tools icon, and then double-click Computer Management.

In the Computer Management console, expand Services and Applications, right-click WMI Control, and then click Properties.

At the Properties window, click the Security tab, and then click the Root->Microsoft->SqlServer. You will see it at the first item.
Zahid AhamedDatabase Administrator

Author

Commented:
SQL Server 2016 Version. WMIC /NAMESPACE:\\root\Microsoft\SqlServer\ComputerManagement13 is for SQL 2016. I have encountered the error. Invalid Query
AlexA lack of information provides a lack of a decent solution.

Commented:
Did you navigate down the tree to ensure that the namespace folder is actually there?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial