I have a file (context.txt - attached) in remote servers which have some value in them,
I would like to use a powershell command to get those values from a remote server.
I am trying this way:
$pathofcontextfile=C:/appl
ication/co
nf/context
.txt
$envname=url/initializatio
n/explicit
tempdir
$remotevalue = Invoke-Command -ComputerName svcname -ArgumentList ($pathofcontextfile, $envname) - ScriptBlock {Param($pathofcontextfile,
$envname); Get-Content $pathofcontextfile get-the-value-from-file-wh
ich-in-thi
s-case-is-
C:/TempDir
}
i am not sure what to write after Get-Content to get the value of explicittempdir value into $remoteval variable.
Any help would be highly appreciated.
Thanks
DevSupport
context.txt