I'm facing with an annoying problem: my script seemingly doesn't pass any argument to a function I've defined.
$server = 'http://127.0.0.1:8080'
Function Get-WorkingDirectory([string]$address)
{
#echo $address
$content = Get-Content -path C:\....\file.txt
$content -contains $address
} #end Get-WorkingDirectory function
if(Get-WorkingDirectory $server)
{
echo "works"
}
else
{
echo "error"
}
It is stuck on "works". If I try to echo address in the function, it is empty. What the heck I'm doing wrong?! I know this is a pretty noobish question, but I tried everything I found on the net. Thanks in advance for help!
it is stuck on "works"?