{"id":1649,"date":"2010-05-19T17:31:22","date_gmt":"2010-05-19T21:31:22","guid":{"rendered":"http:\/\/www.bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/"},"modified":"2010-05-19T17:31:22","modified_gmt":"2010-05-19T21:31:22","slug":"script-to-configure-static-ports-on-exchange-server-2010","status":"publish","type":"post","link":"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/","title":{"rendered":"Script to configure static ports on Exchange Server 2010"},"content":{"rendered":"<p><strong>This post is depricated. Please use newer version of script and read more details here: <a href=\"http:\/\/www.bhargavs.com\/index.php\/2011\/10\/21\/script-to-configure-static-ports-on-exchange-server-2010-2\/\">http:\/\/www.bhargavs.com\/index.php\/2011\/10\/21\/script-to-configure-static-ports-on-exchange-server-2010-2\/<\/a><\/strong><\/p>\n<p>If you are planning to implement or are implementing Exchange Server 2010, you may have already noticed that with new changes introduced in this version we highly recommend that you load balance your CAS servers using hardware load balancer. The client connections are not mediated through RPC Client Access service on CAS and that\u2019s why load balancing CAS is very important.<\/p>\n<p>Now if you know how Outlook clients work with Exchange RPC\/MAPI, you may as well be aware that it uses random high ports for connection to the Exchange servers. This may not work well when you try to configure your hardware load balancer device. There are many other reasons why you may decide that you would rather use a static port or two for services that need it. It also makes it easy to configure network devices to work with few ports than a whole upper range of high ports.<\/p>\n<p>To that matter, TechNet article \u201c<a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/ff625248.aspx\">Load Balancing Requirements of Exchange Protocols<\/a>\u201d has done a great job documenting how you can configure static ports on CAS and Mailbox servers. <a href=\"http:\/\/social.technet.microsoft.com\/wiki\/members\/Henrik-Walther\/default.aspx\">Henrik Walther<\/a> has also provided some more details on TechNet wiki article \u201c<a href=\"http:\/\/social.technet.microsoft.com\/wiki\/contents\/articles\/configuring-static-rpc-ports-on-an-exchange-2010-client-access-server.aspx\">Configuring Static RPC Ports on an Exchange 2010 Client Access Server<\/a>\u201d.<\/p>\n<p>Now only if you had the script to do it all for you so you can enjoy doing other things that may be more important or interesting to you\u2026 \ud83d\ude42<\/p>\n<p>Well, that\u2019s why I have created this script\u2026 just for YOU!<\/p>\n<p>So, how do I run the script?<\/p>\n<p>There are few ways you can run it. One is to just call the script with your server name.<\/p>\n<pre class=\"brush:ps\">&amp; 'c:\\scripts\\Set-StaticPorts.ps1' -Server Server1<\/pre>\n<p>This will change RPC and Address Book ports on the server you specify.<\/p>\n<p>If you want to change many servers, store your servers in a variable and pipe it. Use whichever method works for you to create the array variable with servers you need. One example is to use text file containing one server per line:<\/p>\n<pre class=\"brush:ps\">$Servers = Get-Content c:\\scripts\\servers.txt\n$Servers | Foreach {&amp; 'c:\\scripts\\Set-StaticPorts.ps1' -Server $_}<\/pre>\n<p>The script can be run remotely as long as you have proper permissions on the server to change registry and exchange configuration files.<\/p>\n<p>So far, in examples above, we did not specify which ports to use for each service. The script accommodates for this by having default values 7575 and 7576 for RPC Service and Address Book Service respectively. But what if you want to specify your own ports? Run:<\/p>\n<pre class=\"brush:ps\">&amp; 'c:\\scripts\\Set-StaticPorts.ps1' -Server Server1 -rpcport \"50000\" -abport \"50001\"<\/pre>\n<p>This will allow you to define your own ports. Just ensure you are not using well known ports or ports in use by other services in your environment to avoid any conflict or confusion.<\/p>\n<p>The script is noisy as you may notice when you run it. It is intentional. It will prompt for your confirmation when changing ports if they are already changed before. It will ask for confirmation before restarting services. Now you may say, I am running the script and I know what I am doing. Well, let the force be with you. \u2013force parameter I mean!<\/p>\n<pre class=\"brush:ps\">&amp; 'c:\\scripts\\Set-StaticPorts.ps1' -Server Server1 -rpcport \"50000' -abport \"50001\" \u2013force $true<\/pre>\n<p>And this will silcence prompting. It will still write output for each server to the host. You can redirect it to a file as well!<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush:ps\">&amp; 'c:\\scripts\\Set-StaticPorts.ps1' -Server Server1 -rpcport \"50000\" -abport \"50001\" \u2013force $true | out-file c:\\scripts\\results.txt<\/pre>\n<p>So, where is this script? You can download it here: <a href=\"http:\/\/cid-14adc5cf1e0cbccf.skydrive.live.com\/self.aspx\/.Public\/Exchange%202010\/Scripts\/Set-StaticPorts.ps1\">Set-StaticPorts.ps1<\/a><\/p>\n<p>If you are still reading, here\u2019s the actual script to refer:<\/p>\n<pre class=\"brush:ps\"># FUTURE, Update to run with -auto to find cas servers and run automatically\n# FUTURE, Update to rung with -auto to find PF stores and run on PF host\n#############################################################################\n# Set-StaticPorts.ps1\n# This script will configure static ports for RPC Client Access and\n# Address Book Service on Exchange 2010 CAS servers.\n#\n# Usage syntax:\n# Set-StaticPorts [-Server]  [-rpcport]  [-abport]  [-force] \n#\n# Usage Examples:\n# Set-StaticPorts -Server Server1 -rpcport \"50000\" -abport \"50001\" -force $true\n# Set-StaticPorts -Server Server1\n#\n# Use this script in accordance to the following Technet wiki article:\n# http:\/\/social.technet.microsoft.com\/wiki\/contents\/articles\/configuring-static-rpc-ports-on-an-exchange-2010-client-access-server.aspx\n#\n# Created by\n# Bhargav Shukla\n# http:\/\/blogs.technet.com\/bshukla\n# http:\/\/www.bhargavs.com\n#\n# DISCLAIMER\n# ==========\n# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE\n# RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.\n#############################################################################\n\n# Declare Parameters with defaults\nparam([string]$server,[string]$rpcport = '7575',[string]$abport = '7576',[bool]$force = $false)\n\n# Filter to set tcp-port, for avoiding redundancy in the code that follows\nfunction tcp-port\n{\n\tif (($regkey.getvalue($VALUE)) -eq $null)\n\t{\n\t\t# Create \/ Set TCP\/IP Port key and value\n\t\t$regKey.Setvalue('TCP\/IP Port', \"$rpcport\", 'Dword')\n\n\t\t# Make changes effective immediately\n\t\t$regKey.Flush()\n\n\t\t# Read and store current value\n\t\t$global:TCPPort = $regkey.getvalue($VALUE)\t\n\n\t\t# Close registry key\n\t\t$regKey.Close()\n\n\t\tWrite-Host -ForegroundColor Green \"TCP\/IP Port for RPC Client Access is set to $TCPPort on server $server.\"\n\t}\n\telse\n\t{\n\t\tif (($regkey.getvalue($VALUE)) -ne $rpcport)\n\t\t{\n\t\t\t$rpccurrport = $regkey.getvalue($VALUE)\n\t\t\tIf (($force) -or (Read-Host \"Change the RPC Client Service port from $rpccurrport to $rpcport ? [Y\/N]\") -eq \"Y\")\n\t\t\t{\n\t\t\t\t# Create \/ Set TCP\/IP Port key and value\n\t\t\t\t$regKey.Setvalue('TCP\/IP Port', \"$rpcport\", 'Dword')\n\n\t\t\t\t# Make changes effective immediately\n\t\t\t\t$regKey.Flush()\n\n\t\t\t\t# Read and store current value\n\t\t\t\t$global:TCPPort = $regkey.getvalue($VALUE)\t\n\n\t\t\t\t# Close registry key\n\t\t\t\t$regKey.Close()\n\n\t\t\t\tWrite-Host -ForegroundColor Green \"TCP\/IP Port for RPC Client Access is set to $TCPPort on server $server.\"\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tWrite-Host -ForegroundColor Green \"No changes to RPC Client Service port are made on server $server.\"\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tWrite-Host -ForegroundColor Green \"No changes to RPC Client Service port are necessary on server $server.\"\n\t\t}\n\t}\n}\n\nfunction get-installpath\n{\n\t# Set Exchange base key and value to read\n\t$Reg_ExSetup = \"SOFTWARE\\\\Microsoft\\\\ExchangeServer\\\\v14\\\\Setup\"\n\t$VALUE = \"MsiInstallPath\"\n\n\t# Set regKey for MsiInstallPath\n\t$regKey= $reg.OpenSubKey($REG_ExSetup)\n\n\t# Get Install Path from Registry and replace : with $\n\t$installPath = ($regkey.getvalue($VALUE) | foreach {$_ -replace (\":\",\"`$\")})\n\n\t# Set Address Book Service config file path\n\t$global:ABFile = \"\\\\$Server\\$installPath\"+\"Bin\\microsoft.exchange.addressbook.service.exe.config\"\n\n\t# Close registry key\n\t$regKey.Close()\n}\n\nfunction restart-services\n{\n\t# Restart Microsoft Exchange RPC Client Access and Microsoft Exchange Address Book service\n\t#### You must specify a timeout (in seconds) or the script could potentially never end\n\t$TimeOut = 30\n\n\t#### This will stop a single service on all servers in sequence\n\t$ServiceFilters = \"(name = 'msexchangerpc')\",\"(name = 'msexchangeab')\"\n\n\t$Locator = new-object -com \"WbemScripting.SWbemLocator\"\n\t$WMI = $Locator.ConnectServer($Server, \"root\\cimv2\")\n\t# Stop Service and check for timeout or sucessful stop\n\t\t$ServiceFilters | %{\n\t\t\t$ThisFilter = $_\n\t\t\t(Get-WmiObject -Class Win32_Service -ComputerName $Server -filter \"$ThisFilter AND state='running'\") | %{\n\t\t\t\t$Service = $_\n\t\t\t\t$Refresher = new-object -comobject \"WbemScripting.SWbemRefresher\"\n\t\t\t\t$FreshObject = $Refresher.Add($WMI,$Service.__RELPATH)\n\t\t\t\t$Refresher.Refresh()\n\t\t\t\t$Then = Get-Date\n\t\t\t\t:Checking Do {\n\t\t\t\t\t$Service.StopService() | out-null\n\t\t\t\t\t$Refresher.Refresh()\n\t\t\t\t\tif (($FreshObject.Object.properties_ | ?{$_.name -eq \"state\"}).value -eq \"Stopped\")\n\t\t\t\t\t{\n\t\t\t\t\t\tWrite-Warning \"Service $($Service.Name) is stopped on server $Server.\"\n\t\t\t\t\t\tbreak :Checking;\n\t\t\t\t\t} Else {\n\t\t\t\t\t\tIf (((Get-Date) - $Then).seconds -ge $TimeOut)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tWrite-Warning \"Service $($Service.Name) timed out while trying to stop on server $Server. Please restart service manually.\"\n\t\t\t\t\t\t\tbreak :Checking;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} While ($True)\n\t\t\t}\n\t\t}\n\n\t# Start Service and check for timeout or sucessful start\n\t\t$ServiceFilters | %{\n\t\t\t$ThisFilter = $_\n\t\t\t(Get-WmiObject -Class Win32_Service -ComputerName $Server -filter \"$ThisFilter AND state='Stopped'\") | %{\n\t\t\t\t$Service = $_\n\t\t\t\t$Refresher = new-object -comobject \"WbemScripting.SWbemRefresher\"\n\t\t\t\t$FreshObject = $Refresher.Add($WMI,$Service.__RELPATH)\n\t\t\t\t$Refresher.Refresh()\n\t\t\t\t$Then = Get-Date\n\t\t\t\t:Checking Do {\n\t\t\t\t\t$Service.StartService() | out-null\n\t\t\t\t\t$Refresher.Refresh()\n\t\t\t\t\tif (($FreshObject.Object.properties_ | ?{$_.name -eq \"state\"}).value -eq \"running\")\n\t\t\t\t\t{\n\t\t\t\t\t\tWrite-Host \"Service $($Service.Name) started successfully on server $Server\"\n\t\t\t\t\t\tbreak :Checking;\n\t\t\t\t\t} Else {\n\t\t\t\t\t\tIf (((Get-Date) - $Then).seconds -ge $TimeOut)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tWrite-Warning \"Service $($Service.Name) timed out while trying to start on server $Server. Please restart service manually.\"\n\t\t\t\t\t\t\tbreak :Checking;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} While ($True)\n\t\t\t}\n\t\t}\n}\n\nIf ($server)\n{\n\t# Set Registry Key variables\n\t$REG_BASE = \"System\\\\CurrentControlSet\\\\Services\\\\MSExchangeRPC\"\n\t$REG_KEY = \"System\\\\CurrentControlSet\\\\Services\\\\MSExchangeRPC\\\\ParametersSystem\"\n\t$VALUE = 'TCP\/IP Port'\n\n\t# Open remote registry\n\t$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $Server)\n\n\t# Open the targeted remote registry key\/subkey as read\/write\n\t$regKey = $reg.OpenSubKey($REG_KEY,$true)\n\n\t# Create\/Modify Key and Values as necessary\n\tif ($regKey)\n\t{\n\ttcp-port\n\t}\n\telse\n\t{\n\t$regBase = $reg.OpenSubKey($REG_BASE,$true)\n\t$regBase.CreateSubKey('ParametersSystem')\n\t$regBase.Close()\n\t# Open the targeted remote registry key\/subkey as read\/write\n\t$regKey = $reg.OpenSubKey($REG_KEY,$true)\n\ttcp-port\n\t}\n\n\t# Get location of Address Book Service configuration file\n\tget-installpath\n\n\t# Verify the file exists, exit if it doesn't\n\tif (Test-Path $ABFile -ErrorAction SilentlyContinue)\n\t{\n\t\t# Backup file before editing\n\t\t$currentDate = (get-date).tostring(\"MM_dd_yyyy-hh_mm_s\")\n\t\t$ABbackup = $ABFile + \".$currentDate\"\n\t\t$xml = [xml](get-content $ABFile)\n\t\t$xml.Save($ABbackup)\n\n\t\t# Edit RpcTcpPort if 0, ask user for approval if not 0\n\t\t$root = $xml.get_DocumentElement();\n\t\tForEach ($item in $root.appSettings.add)\n\t\t{\n\t\tif (($item.key -eq \"RpcTcpPort\") -and ($item.value -eq \"0\"))\n\t\t\t{\n\t\t\t\t$item.value=\"$abport\"\n\t\t\t\tWrite-Host -ForegroundColor Green \"TCP\/IP Port for Address Book Service is set to $ABPort on server $server.\"\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tIf (($item.key -eq \"RpcTcpPort\") -and ($item.value -ne \"$abport\"))\n\t\t\t\t{\n\t\t\t\tif (($force) -or (Read-Host \"Change port from $($item.value) to $abport on server $server ? [Y\/N]\") -eq \"Y\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$item.value=\"$abport\"\n\t\t\t\t\t\tWrite-Host -ForegroundColor Green \"TCP\/IP Port for Address Book Service is set to $ABPort on server $server.\"\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tWrite-Host -ForegroundColor Green \"No changes are made to TCP\/IP Port for Address Book Service on server $server.\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$xml.Save($ABFile)\n\t}\n\telse\n\t{\n\tWrite-Host -ForegroundColor Red -BackgroundColor Black \"Address Book Service configuration file does not exist for server $server. Please verify file and update manually.\"\n\t}\n\n\t# Ask for and restart services if requested\n\tIf (($force) -or (Read-Host \"Restart services MSExchangeRPC and MSExchangeAB? [Y\/N]\") -eq \"Y\")\n\t\t{\n\t\t\trestart-services\n\t\t}\n\t\telse\n\t\t{\n\t\t\tWrite-Warning \"Please restart the Microsoft Exchange RPC Client Access (MSExchangeRPC) service for changes to take effect.\"\n\t\t}\n\n\t# Reminder for MAilbox Servers\n\tWrite-Warning \"Please do not forget to change ports on Mailbox servers for Public Folder Access.\"\n}\nelse\n{\nWrite-Host -ForegroundColor Red -BackgroundColor Black \"Server Name is null. Please provide Server where static ports need to be set.\"\nWrite-Host -ForegroundColor Red -BackgroundColor Black \"The syntax is 'Set-StaticPorts.ps1 `\"servername`\" `\"1234`\" `\"1235`\"'.\"\nWrite-Host -ForegroundColor Red -BackgroundColor Black \"Please replace values of `\"1234`\" and `\"1235`\" with valid port numbers for RPC and Address Book Services respectively.\"\n}<\/pre>\n<p>This is a cross post from <a href=\"http:\/\/blogs.technet.com\/bshukla\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/blogs.technet.com\/bshukla<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is depricated. Please use newer version of script and read more details here: http:\/\/www.bhargavs.com\/index.php\/2011\/10\/21\/script-to-configure-static-ports-on-exchange-server-2010-2\/ If you are planning to implement or are implementing Exchange Server 2010, you may [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[52,19],"tags":[],"class_list":["post-1649","post","type-post","status-publish","format-standard","hentry","category-exchange-2010","category-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Script to configure static ports on Exchange Server 2010 - Bhargav&#039;s IT Playground<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Script to configure static ports on Exchange Server 2010 - Bhargav&#039;s IT Playground\" \/>\n<meta property=\"og:description\" content=\"This post is depricated. Please use newer version of script and read more details here: http:\/\/www.bhargavs.com\/index.php\/2011\/10\/21\/script-to-configure-static-ports-on-exchange-server-2010-2\/ If you are planning to implement or are implementing Exchange Server 2010, you may [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/\" \/>\n<meta property=\"og:site_name\" content=\"Bhargav&#039;s IT Playground\" \/>\n<meta property=\"article:published_time\" content=\"2010-05-19T21:31:22+00:00\" \/>\n<meta name=\"author\" content=\"Bhargav\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bhargav\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2010\\\/05\\\/19\\\/script-to-configure-static-ports-on-exchange-server-2010\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2010\\\/05\\\/19\\\/script-to-configure-static-ports-on-exchange-server-2010\\\/\"},\"author\":{\"name\":\"Bhargav\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\"},\"headline\":\"Script to configure static ports on Exchange Server 2010\",\"datePublished\":\"2010-05-19T21:31:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2010\\\/05\\\/19\\\/script-to-configure-static-ports-on-exchange-server-2010\\\/\"},\"wordCount\":584,\"commentCount\":17,\"publisher\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\"},\"articleSection\":[\"Exchange 2010\",\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2010\\\/05\\\/19\\\/script-to-configure-static-ports-on-exchange-server-2010\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2010\\\/05\\\/19\\\/script-to-configure-static-ports-on-exchange-server-2010\\\/\",\"url\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2010\\\/05\\\/19\\\/script-to-configure-static-ports-on-exchange-server-2010\\\/\",\"name\":\"Script to configure static ports on Exchange Server 2010 - Bhargav&#039;s IT Playground\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#website\"},\"datePublished\":\"2010-05-19T21:31:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2010\\\/05\\\/19\\\/script-to-configure-static-ports-on-exchange-server-2010\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2010\\\/05\\\/19\\\/script-to-configure-static-ports-on-exchange-server-2010\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2010\\\/05\\\/19\\\/script-to-configure-static-ports-on-exchange-server-2010\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bhargavs.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Script to configure static ports on Exchange Server 2010\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#website\",\"url\":\"https:\\\/\\\/bhargavs.com\\\/\",\"name\":\"Bhargav's IT Playground\",\"description\":\"Passion for Technology. Power of Collaboration.\",\"publisher\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bhargavs.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\",\"name\":\"Bhargav\",\"logo\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/bhargavs.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Script to configure static ports on Exchange Server 2010 - Bhargav&#039;s IT Playground","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:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/","og_locale":"en_US","og_type":"article","og_title":"Script to configure static ports on Exchange Server 2010 - Bhargav&#039;s IT Playground","og_description":"This post is depricated. Please use newer version of script and read more details here: http:\/\/www.bhargavs.com\/index.php\/2011\/10\/21\/script-to-configure-static-ports-on-exchange-server-2010-2\/ If you are planning to implement or are implementing Exchange Server 2010, you may [&hellip;]","og_url":"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/","og_site_name":"Bhargav&#039;s IT Playground","article_published_time":"2010-05-19T21:31:22+00:00","author":"Bhargav","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Bhargav","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/#article","isPartOf":{"@id":"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/"},"author":{"name":"Bhargav","@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26"},"headline":"Script to configure static ports on Exchange Server 2010","datePublished":"2010-05-19T21:31:22+00:00","mainEntityOfPage":{"@id":"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/"},"wordCount":584,"commentCount":17,"publisher":{"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26"},"articleSection":["Exchange 2010","PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/","url":"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/","name":"Script to configure static ports on Exchange Server 2010 - Bhargav&#039;s IT Playground","isPartOf":{"@id":"https:\/\/bhargavs.com\/#website"},"datePublished":"2010-05-19T21:31:22+00:00","breadcrumb":{"@id":"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/bhargavs.com\/index.php\/2010\/05\/19\/script-to-configure-static-ports-on-exchange-server-2010\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bhargavs.com\/"},{"@type":"ListItem","position":2,"name":"Script to configure static ports on Exchange Server 2010"}]},{"@type":"WebSite","@id":"https:\/\/bhargavs.com\/#website","url":"https:\/\/bhargavs.com\/","name":"Bhargav's IT Playground","description":"Passion for Technology. Power of Collaboration.","publisher":{"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bhargavs.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26","name":"Bhargav","logo":{"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/bhargavs.com"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1674,"url":"https:\/\/bhargavs.com\/index.php\/2011\/10\/21\/script-to-configure-static-ports-on-exchange-server-2010-2\/","url_meta":{"origin":1649,"position":0},"title":"Script to configure static ports on Exchange Server 2010","author":"Bhargav","date":"October 21, 2011","format":false,"excerpt":"There is nothing new about this. If you have been reading about Exchange Server 2010 or have it deployed with hardware load balancer, chances are, you have read how to configure static ports on Exchange Server 2010 on TechNet Social wiki for Exchange 2010. Chances are that you have also\u2026","rel":"","context":"In &quot;Exchange 2010&quot;","block_context":{"text":"Exchange 2010","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/exchange-server\/exchange-2010\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1115,"url":"https:\/\/bhargavs.com\/index.php\/2015\/11\/04\/mac-mail-not-connecting-to-exchange-server-part-1\/","url_meta":{"origin":1649,"position":1},"title":"Mac Mail not connecting to Exchange Server &#8211; Part 1","author":"Bhargav","date":"November 4, 2015","format":false,"excerpt":"My good friend and renowned Exchange MVP Jeff Guillet (expta.com fame) brought an interesting issue to my attention. On his Mac, built-in Mail client would not connect to Exchange through KEMP LoadMaster. The load balancer was configured to user Layer 7 load balancing. The Exchange environment was mixed Exchange 2013\u2026","rel":"","context":"In &quot;Exchange 2016&quot;","block_context":{"text":"Exchange 2016","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/exchange-server\/exchange-2016\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/bhargavs.com\/wp-content\/uploads\/2015\/11\/image_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1120,"url":"https:\/\/bhargavs.com\/index.php\/2015\/11\/05\/mac-mail-not-connecting-to-exchange-server-part-2\/","url_meta":{"origin":1649,"position":2},"title":"Mac Mail not connecting to Exchange Server &#8211; Part 2","author":"Bhargav","date":"November 5, 2015","format":false,"excerpt":"In Part 1 of this article, we discussed symptoms of Mac Mail unable to connect to Exchange 2016 servers through KEMP LoadMaster load balancers. We also discussed troubleshooting steps that addressed the issue of ExRCA.com unable to pass EWS tests, however, we stopped there since Mac Mail failed to connect\u2026","rel":"","context":"In &quot;Exchange 2016&quot;","block_context":{"text":"Exchange 2016","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/exchange-server\/exchange-2016\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/bhargavs.com\/wp-content\/uploads\/2015\/11\/image_thumb3.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":475,"url":"https:\/\/bhargavs.com\/index.php\/2012\/11\/14\/outlook-must-be-online-or-connected\/","url_meta":{"origin":1649,"position":3},"title":"Outlook must be online or connected\u2026","author":"Bhargav","date":"November 14, 2012","format":false,"excerpt":"Testing Exchange 2013 means careful planning of what you are going to test in lab, what you need to test al given scenarios and what is required. One of my golden rule is to test multiple versions of clients against given server. So in my recent configuration testing, I created\u2026","rel":"","context":"In &quot;Exchange 2013&quot;","block_context":{"text":"Exchange 2013","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/exchange-server\/exchange-2013\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/bhargavs.com\/wp-content\/uploads\/2012\/11\/image_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1696,"url":"https:\/\/bhargavs.com\/index.php\/2013\/05\/15\/how-to-load-balance-office-web-apps-server-2013-farm\/","url_meta":{"origin":1649,"position":4},"title":"How to load balance Office Web Apps Server 2013 farm","author":"Bhargav","date":"May 15, 2013","format":false,"excerpt":"In my previous post, I showed how to create an Office Web Apps Server 2013 farm. Since I can\u2019t leave you hanging, I am going to show you the next step of setting up a load balancer for the same. I assume you have created DNS entry for owaps.contoso.com and\u2026","rel":"","context":"In &quot;Load Balancing&quot;","block_context":{"text":"Load Balancing","link":"https:\/\/bhargavs.com\/index.php\/category\/technology\/load-balancing\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/bhargavs.com\/wp-content\/uploads\/2013\/05\/image_thumb2.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1154,"url":"https:\/\/bhargavs.com\/index.php\/2015\/11\/18\/configuring-rich-attachment-preview-in-exchange-2016\/","url_meta":{"origin":1649,"position":5},"title":"Configuring rich attachment preview in Exchange 2016","author":"Bhargav","date":"November 18, 2015","format":false,"excerpt":"Rich attachment preview isn\u2019t new to Exchange 2016. Exchange 2013 offered ability to preview Office attachments in browser window when using Outlook Web App. If you didn\u2019t configure Office Web App server integration for Exchange 2013, check out this TechNet article. For Exchange 2016, a couple of things have changed.\u2026","rel":"","context":"In &quot;Exchange 2016&quot;","block_context":{"text":"Exchange 2016","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/exchange-server\/exchange-2016\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/bhargavs.com\/wp-content\/uploads\/2015\/11\/image_thumb9.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_shortlink":"https:\/\/wp.me\/pkROc-qB","_links":{"self":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/posts\/1649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/comments?post=1649"}],"version-history":[{"count":0,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/posts\/1649\/revisions"}],"wp:attachment":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/media?parent=1649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/categories?post=1649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/tags?post=1649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}