I have a vendor properties file and it has property name and values. Now I have to read property file and display only property names.
Below are some property names and its values.
ipaddr=10.1.1.1,12.4.5.6
ports=2345
location=anywhere
I want my output to display like below
ipaddr
ports
location
I used the following command to read the file:
Get-Content -Path "C:\Test\run.properties" |
Where-Object {!$_.StartsWith("#") }