I'm a newbie in Powershell. This is probably quite simple, but for a newbie is not that obvious. I have a file with credentials: credentials.cfg with format like this
[server_1]
username=user_1
password=pass_1
[server_2]
username=user_2
password=pass_2
I need to read this file and based on a parameter to get the username and password to create a connection string, so to say, to populate $username and $password in my PS script.
The format is always the same:
[block]
username=x
password=y
Thanks in advance