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

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -