Unfortunately in this special case it will be a little more complex than that.
BTW: Please format your code as code here in the forum using the code tag button (pre) provided on the icon bar of the post editor. Thanks.
$IP = Get-Content -Path .\ip.txt
$Name = Get-Content -Path .\name.txt
for ($i = 0; $i -lt $IP.Count; $i++) {
[PSCustomObject]@{
IP = $IP[$i]
Name = $Name[$i]
}
}
Regardless of that: you might start with learning the very basics of Powershell first. That will save you from a lot of missunderstandings, wasted time and frustrations.
Thanks for your answer and your suggestion. I think I will , however , I think I still will post my question here if I meet a problem that I don’t known how to do that in my job , maybe it’s because I haven’t learn that top in the whole learning process or I can’t get an answer from internet.