Link to home
Start Free TrialLog in
Avatar of Albert Widjaja
Albert WidjajaFlag for Australia

asked on

How to display array of string in Powershell into CSV properly ?

Hi People,

I'd like to know how to make the IP address column in the CSV a string of IP address ?

here's the script that I run:

Get-VMHost | Get-VM | Get-VMGuest | Select HostName, OSFullName, IPAddress, VmName | Sort HostName | Export-Csv C:\PRODVM.csv

Open in new window


in the CSV all result is good except the IP address column which returns System.String[]
SOLUTION
Avatar of stefor
stefor
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Albert Widjaja

ASKER

Thanks anyway.