Hi,
I am trying to export to csv two IP lists that I imported from the Exchange client access servers. Here is what I have:
$cas01 = Get-ReceiveConnector server1securerelay | select RemoteIPRanges $cas1 = $cas01.RemoteIPRanges $cas02 = Get-ReceiveConnector server2securerelay | select RemoteIPRanges $cas2 = $cas02.RemoteIPRanges $Object = New-Object -TypeName PSObject $Object | Add-Member NoteProperty -Name Cas01 -Value $cas1 $Object | Add-Member -MemberType NoteProperty -Name Cas02 -Value $cas2 $Object | Export-Csv test.csv -Append -NoTypeInformation
When I run this it works but it places all of the IPs on the same line instead one row per column IP.
For example, it looks like this in excel after the export:
Cas01,Cas02 ip,ip,ip,ip,ip,ip,ip,etc
I want it to look like this:
Cas02,Cas02 ip,ip ip,ip ip,ip
Any ideas?
submitted by /u/raider111111
[link] [comments]
The post Export two exchange IP lists to a CSV appeared first on How to Code .NET.