sql server 2008 - How to configure SQL Native Client with powershell? -


i have been tasked write script enable tcp , named pipes protocols sql server 2008 express r2 instance. have found out how enable these protocols sql server instance itself, haven't found way control sql native client powershell.

my script part of installer, , code installing expects these protocols enabled.

thanks

[reflection.assembly]::loadwithpartialname("microsoft.sqlserver.sqlwmimanagement") $wmi = new-object ("microsoft.sqlserver.management.smo.wmi.managedcomputer") "$env:computername" $wmi.serverinstances["sqlexpress"].serverprotocols["tcp"].isenabled = $true $wmi.serverinstances["sqlexpress"].serverprotocols["np"].isenabled = $true $wmi.clientprotocols["tcp"].isenabled = $true $wmi.clientprotocols["np"].isenabled = $true 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -