PowerShellWindows PowerShell

Retrieve Oracle instance port number using PowerShell | REGEX

A requirement popped up to get the Oracle instance(s) port number before building a connection string for establishing a connection. Team used tnsping utility which returns results like shown below

We need to get the port number – Which is really a very straight forward approach using regular expression

REGEX

Result : PORT = 15210

 

Leave a Reply

Your email address will not be published. Required fields are marked *