{"id":2937,"date":"2013-02-21T01:22:00","date_gmt":"2013-02-21T00:22:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/"},"modified":"2013-02-21T01:22:00","modified_gmt":"2013-02-21T00:22:00","slug":"sql-server-2012-configuring-your-tcp-port-via-powershell","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/","title":{"rendered":"SQL Server 2012: Configuring your TCP Port via Powershell"},"content":{"rendered":"<p>Changing the default TCP port 1433 for SQL Server is an important step for securing your SQL Server.\u00a0I have written a script in PowerShell to modify the port number that helps me perform this task. This blog posting will show you how to do it. Please note that the code in this article is for SQL Server 2012 on Windows Server 2012.<\/p>\n<h3>Initialization<\/h3>\n<p>Run SQLPS to launch the SQL PowerShell in a command prompt.<\/p>\n<p>First you have to initialize the Microsoft.SqlServer.Management.Smo namespace that contains the classes representing the core SQL Server database engine objects:<\/p>\n<p><code>$smo = 'Microsoft.SqlServer.Management.Smo.'<\/code><\/p>\n<p>Then, you have to set the ManagedComputer object that represents a Windows Management Instrumentation (WMI) installation on an instance of Microsoft SQL Server.<\/p>\n<p><code>$wmi = new-object ($smo + 'Wmi.ManagedComputer')<\/code><\/p>\n<p>Let me show you my instance information with $wmi (sample):<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"PowerShellChangePort01.jpg\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/88\/PowerShellChangePort01.jpg\"><img decoding=\"async\" style=\"margin-left: auto;margin-right: auto\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort01.jpg\" alt=\"\" \/><\/a><\/p>\n<p>You will notice that in ClientProtocols, I have the tcp protocol.<\/p>\n<h3>Searching the port value<\/h3>\n<p>The next step is to find the Tcp Protocol settings:<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">$uri = \"ManagedComputer[@Name='']\/ ServerInstance[@Name='']\/ServerProtocol[@Name='Tcp']\"\n$Tcp = $wmi.GetSmoObject($uri)<\/pre>\n<p>This is my $tcp variable (sample):<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"PowerShellChangePort02.jpg\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/88\/PowerShellChangePort02.jpg\"><img decoding=\"async\" style=\"margin-left: auto;margin-right: auto\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort02.jpg\" alt=\"\" \/><\/a><\/p>\n<p>Please not that IsEnabled is set to true. If you have IsEnabled on false, you can set it up to true with this command:<\/p>\n<p><code>$Tcp.IsEnabled = $true<\/code><\/p>\n<p>And do not forget to validate this change with an Alter:<\/p>\n<p><code>$Tcp.Alter()<\/code><\/p>\n<p>To check the port, you need to go to the\u00a0IPAll characteristics:<\/p>\n<p><code>$wmi.GetSmoObject($uri + \"\/IPAddress[@Name='IPAll']\").IPAddressProperties<\/code><\/p>\n<p>Like in the SQL Server configuration manager, two sections will appear: One is for the TcpDymanicPorts and the second for the fixed TcpPort (sample):<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"PowerShellChangePort03.jpg\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/88\/PowerShellChangePort03.jpg\"><img decoding=\"async\" style=\"margin-left: auto;margin-right: auto\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort03.jpg\" alt=\"\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Changing the TCP port<\/h3>\n<p>To change the value, it\u2019s very simple, the field is simply named Value:<\/p>\n<p><code>$wmi.GetSmoObject($uri + \"\/IPAddress[@Name='IPAll']\").IPAddressProperties[1].Value=\"xxxxx\"<\/code><\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"PowerShellChangePort04.jpg\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/88\/PowerShellChangePort04.jpg\"><img decoding=\"async\" style=\"margin-left: auto;margin-right: auto\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort04.jpg\" alt=\"\" \/><\/a><\/p>\n<p>If you look at the characteristics with your precedent command&#8230;<\/p>\n<p><code>$wmi.GetSmoObject($uri + \"\/IPAddress[@Name='IPAll']\").IPAddressProperties<\/code><\/p>\n<p>&#8230;the port has changed, but in the Sql Server Configuration Manager, the port still is 1433:<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"PowerShellChangePort05.jpg\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/88\/PowerShellChangePort05.jpg\"><img decoding=\"async\" style=\"margin-left: auto;margin-right: auto\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort05.jpg\" alt=\"\" \/><\/a><\/p>\n<p>But why???\u00a0 \ud83d\ude41<\/p>\n<h3>Validating the change<\/h3>\n<p>Yes, of course&#8230; you need to validate the change with the Alter command!<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"PowerShellChangePort06.jpg\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/88\/PowerShellChangePort06.jpg\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort06.jpg\" alt=\"\" \/><\/a><\/p>\n<p>And now, if you look at the SQL Server Configuration Manager, the change is applied:<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"PowerShellChangePort07.jpg\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/88\/PowerShellChangePort07.jpg\"><img decoding=\"async\" style=\"margin-left: auto;margin-right: auto\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort07.jpg\" alt=\"\" \/><\/a><\/p>\n<p>To finish, do not forget to restart your services to activate the port change.:-D<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Changing the default TCP port 1433 for SQL Server is an important step for securing your SQL Server.\u00a0I have written a script in PowerShell to modify the port number that helps me perform this task. This blog posting will show you how to do it. Please note that the code in this article is for&hellip;&nbsp;<\/p>\n","protected":false},"author":15,"featured_media":2938,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133],"tags":[203,272,54],"class_list":["post-2937","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database","tag-command-lines","tag-powershell","tag-sql-server-2012"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.4 (Yoast SEO v28.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server 2012: Configuring your TCP Port via Powershell - dbi services | Blog<\/title>\n<meta name=\"description\" content=\"Changing the default TCP port 1433 for SQL Server is a first step to securing your SQL Server. To help me to do this by my customers, I have writed a script in Powershell to change the port number to another\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server 2012: Configuring your TCP Port via Powershell\" \/>\n<meta property=\"og:description\" content=\"Changing the default TCP port 1433 for SQL Server is a first step to securing your SQL Server. To help me to do this by my customers, I have writed a script in Powershell to change the port number to another\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services | Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-21T00:22:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"158\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"St\u00e9phane Haby\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"St\u00e9phane Haby\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/\"},\"author\":{\"name\":\"St\u00e9phane Haby\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/7980252d7d7a521e285e7c66114cf82a\"},\"headline\":\"SQL Server 2012: Configuring your TCP Port via Powershell\",\"datePublished\":\"2013-02-21T00:22:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/\"},\"wordCount\":332,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/b2ap3_thumbnail_PowerShellChangePort01.jpg\",\"keywords\":[\"Command lines\",\"PowerShell\",\"SQL Server 2012\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/\",\"name\":\"SQL Server 2012: Configuring your TCP Port via Powershell - dbi services | Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/b2ap3_thumbnail_PowerShellChangePort01.jpg\",\"datePublished\":\"2013-02-21T00:22:00+00:00\",\"description\":\"Changing the default TCP port 1433 for SQL Server is a first step to securing your SQL Server. To help me to do this by my customers, I have writed a script in Powershell to change the port number to another\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/b2ap3_thumbnail_PowerShellChangePort01.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/b2ap3_thumbnail_PowerShellChangePort01.jpg\",\"width\":500,\"height\":158},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2012-configuring-your-tcp-port-via-powershell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server 2012: Configuring your TCP Port via Powershell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\"},\"alternateName\":\"dbi Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\",\"name\":\"dbi services\",\"alternateName\":\"dbi\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialised in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/7980252d7d7a521e285e7c66114cf82a\",\"name\":\"St\u00e9phane Haby\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/STH_web-min-scaled.jpg\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/STH_web-min-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/STH_web-min-scaled.jpg\",\"caption\":\"St\u00e9phane Haby\"},\"description\":\"St\u00e9phane Haby has more than 20 years of experience in Microsoft solutions, specializing in the installation, migration, best practices, and performance analysis of Microsoft SQL Server, as well as Microsoft Business Intelligence solutions (SharePoint, Office) and .NET development for the banking sector. A former Microsoft Most Valuable Professional (MVP) and early adopter of Microsoft Team System in France, he has authored several technical articles. He holds Microsoft Certified Solutions Associate (MCSA) and Expert (MCSE) for SQL Server, MCTS, MCITP for SQL Server 2008, and ITIL V3 Foundation certifications. His industry experience covers chemicals and pharma, banking, and financial services.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/stephane-haby\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server 2012: Configuring your TCP Port via Powershell - dbi services | Blog","description":"Changing the default TCP port 1433 for SQL Server is a first step to securing your SQL Server. To help me to do this by my customers, I have writed a script in Powershell to change the port number to another","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server 2012: Configuring your TCP Port via Powershell","og_description":"Changing the default TCP port 1433 for SQL Server is a first step to securing your SQL Server. To help me to do this by my customers, I have writed a script in Powershell to change the port number to another","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/","og_site_name":"dbi services | Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2013-02-21T00:22:00+00:00","og_image":[{"width":500,"height":158,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort01.jpg","type":"image\/jpeg"}],"author":"St\u00e9phane Haby","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"St\u00e9phane Haby","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/"},"author":{"name":"St\u00e9phane Haby","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/7980252d7d7a521e285e7c66114cf82a"},"headline":"SQL Server 2012: Configuring your TCP Port via Powershell","datePublished":"2013-02-21T00:22:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/"},"wordCount":332,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort01.jpg","keywords":["Command lines","PowerShell","SQL Server 2012"],"articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/","name":"SQL Server 2012: Configuring your TCP Port via Powershell - dbi services | Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort01.jpg","datePublished":"2013-02-21T00:22:00+00:00","description":"Changing the default TCP port 1433 for SQL Server is a first step to securing your SQL Server. To help me to do this by my customers, I have writed a script in Powershell to change the port number to another","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort01.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/b2ap3_thumbnail_PowerShellChangePort01.jpg","width":500,"height":158},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2012-configuring-your-tcp-port-via-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server 2012: Configuring your TCP Port via Powershell"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/blog\/#organization"},"alternateName":"dbi Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/blog\/#organization","name":"dbi services","alternateName":"dbi","url":"https:\/\/www.dbi-services.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialised in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/7980252d7d7a521e285e7c66114cf82a","name":"St\u00e9phane Haby","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/STH_web-min-scaled.jpg","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/STH_web-min-scaled.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/STH_web-min-scaled.jpg","caption":"St\u00e9phane Haby"},"description":"St\u00e9phane Haby has more than 20 years of experience in Microsoft solutions, specializing in the installation, migration, best practices, and performance analysis of Microsoft SQL Server, as well as Microsoft Business Intelligence solutions (SharePoint, Office) and .NET development for the banking sector. A former Microsoft Most Valuable Professional (MVP) and early adopter of Microsoft Team System in France, he has authored several technical articles. He holds Microsoft Certified Solutions Associate (MCSA) and Expert (MCSE) for SQL Server, MCTS, MCITP for SQL Server 2008, and ITIL V3 Foundation certifications. His industry experience covers chemicals and pharma, banking, and financial services.","url":"https:\/\/www.dbi-services.com\/blog\/author\/stephane-haby\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/2937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=2937"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/2937\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/2938"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=2937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=2937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=2937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}