Is there a way to read a text file C:\\test.txt and retrieve a particular value?
ie file looks like this:
serverName=serv8496 midasServer=serv8194
Yes, read the file, split each line and assign the split result to the Name and Value parameters:
Get-Content file.txt | Foreach-Object{ $var = $_.Split('=') New-Variable -Name $var[0] -Value $var[1] }