Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

PowerShell Table formatting...

$
0
0

Having a silly problem. I'm pulling Active directory information for this script. One array is Server names. The other array is the owner. I thought I could put these two arrays into a variable and have them display nicely. I kinda understand whats happening. Under ServerName its putting the whole Array on the first line. This makes sense because its type is an array and there is only one of them. Its doing the same for Owner.

What I would like to do is make a object that will display each item side by side.

This is my input after the Arrays of Servername and Owner are filled

Powershell
$list=@{}$list.ServerName=$ServerName$list.Owner=$Owner$ObjectName=New-ObjectPSobject-Property$list$ObjectName

This is what I get

Powershell
ServerNameOwner---------------{ORDPDSATRAWEB01.ds.ad.adp.com,dsdc1orl.ds.ad.adp.com,ORDPVMWDem02.ds....

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>