# I need a Export-CSV now

**URL:** <https://forums.powershell.org/t/i-need-a-export-csv-now/22551>\
**Category:** PowerShell Help\
**Created:** [July 3, 2023, 11:23am UTC](https://forums.powershell.org/t/i-need-a-export-csv-now/22551 "2023-07-03T11:23:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flying](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@Flying](https://forums.powershell.org/u/Flying)\
**Post date:** [July 3, 2023, 11:23am UTC](https://forums.powershell.org/t/i-need-a-export-csv-now/22551/1 "2023-07-03T11:23:58Z")

</div>

Hi

I’m beginner in PowerShell.

I use this Code for list all Users with phone number:  
`Get-CsOnlineUser | Where-Object { $_.LineURI -notlike $null } | ft DisplayName,UserPrincipalName,LineURI`

I need a Export-CSV now. I’ve tried a variety of things, but somehow I’m not getting there.

Anybody have a tip?

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 3, 2023, 11:30am UTC](https://forums.powershell.org/t/i-need-a-export-csv-now/22551/2 "2023-07-03T11:30:55Z")

</div>

Reto,  
Welcome and Grüezi wohl to the forum. 👋🏼

> [@Flying](#):
>
> I’ve tried a variety of things, but somehow I’m not getting there.

What exactly have you tried?

You may (re-)read the help for

> **[Export-Csv (Microsoft.PowerShell.Utility) - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/export-csv?view=powershell-7.3)**
>
> The Export-CSV cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a character-separated list of the object's property values. You can use the Export-CSV cmdlet to create spreadsheets and share data with...

Please read the help completely including the examples to learn how to use it.

---

<div class="post-metadata">

**Author:** ![Flying](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@Flying](https://forums.powershell.org/u/Flying)\
**Post date:** [July 3, 2023, 12:39pm UTC](https://forums.powershell.org/t/i-need-a-export-csv-now/22551/3 "2023-07-03T12:39:27Z")

</div>

Hi Olaf

Thanks for your answer and link. I’ll re read this information.

The last what i do was  
`Get-CsOnlineUser | Where-Object { $_.LineURI -notlike $null } | ft DisplayName,UserPrincipalName,LineURI | Export-Csv -Path C:\temp\report.csv -Delimiter ';' -NoTypeInformation`

I’ll invest in a lonely time to find more for the exact command.

---

<div class="post-metadata">

**Author:** ![Flying](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@Flying](https://forums.powershell.org/u/Flying)\
**Post date:** [July 3, 2023, 2:18pm UTC](https://forums.powershell.org/t/i-need-a-export-csv-now/22551/4 "2023-07-03T14:18:07Z")

</div>

Yes, it works with

```auto
Get-CsOnlineUser | 
Where-Object { $_.LineURI -notlike $null } | 
select DisplayName,UserPrincipalName,LineURI | 
Export-Csv C:\temp\blabla.csv

```

Good Day

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 3, 2023, 2:33pm UTC](https://forums.powershell.org/t/i-need-a-export-csv-now/22551/5 "2023-07-03T14:33:06Z")

</div>

> [@Flying](#):
>
> Yes, it works with

Great that you figured it out by yourself. 👍🏼

> [@Flying](#):
>
> The last what i do was

Explanation what was wrong:

Format cmdlets are mostly made to be used as the very last element of a pippeline. It almost never makes any sense to pipe the output of a format cmdlet - like `Format-Table`, `Format-List` or `Format-Wide` and so on - to a further cmdlet. They are meant to produce screen output only.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [January 18, 2024, 12:55am UTC](https://forums.powershell.org/t/i-need-a-export-csv-now/22551/6 "2024-01-18T00:55:59Z")

</div>

Closed on January 18, 2024, 12:55am UTC


