Thanks! It worked fine. It was a typo on my end.
One question though, will I be able to use $hostname for further tasks or do I need to import it into the txt file
and get-content from there.
Example,
foreach ($host in $hostname)
{ write-host "Reconfiguring HA on $host" }
OR
$hostnamefile = "some text File with all $hostname" #And how to do it
$hostlist = get-content -path $hostnamefile
foreach ($host in $hostlist)
Sorry for the confusion but getting few thing clear.
↧
Re: PowerCli : Read from URL
↧