There is a file which has this content
SomeText1
SomeCommand -parameterName abc -login def -password geh
SomeText2
Could you please advise what PowerShell should be in order to read into the array the variables and values (may be like key/value pair) for
login=def
password=geh
The specific about that question is that the order of the login and password parameters may be different, so I need to find the way how to locate the key/value based on the known key name. Also, I know that I need only login and password parameters and associated values.
Thank you very much for your help, in advance!
P.S. I was planning to use the following commands to read the file content, but that can be changed:
$GetFileName = "$env:userprofile\Desktop\Folder\Input.txt"
$content = [IO.File]::ReadAllText($GetFileName)