I got a txt file that has a bunch of computers
pc1
pc2
pc3
etc..
I want to pass all these into a function
function getinfo {
param(
int[]$array
write-host $array
)
$computers = get-content computer.txt
getinfo.ps1 -array $computers
but getting error
any idea how to fix this?