Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Another Empty Pipe Error when Export CSV used

$
0
0

Thanks for the response!

I went with

# Input Users from text file
$USERS = Get-Content C:\inputfiles\USERS.txt

#pipe variable through to get requisite information and export the information to csv
$USERS|Foreach{Get-ADUser $_ -Properties * |Select Surname, GivenName, SAMAccountName, Loc, msExchHomeServerName, mDBStorageQuota, mDBOverQuotaLimit, mDBOverHardQuotaLimit, mDBUseDefaults}|Export-CSV -Path C:\outputfiles\UserEMail.csv -notype

Seems to work fine. I just have to putz around in excel to do a

=RIGHT(E2,13)

to make the exchange server name a bit more readable. (no biggie)

I appreciate you taking the time to show me the “why” as much as the “what” when things go wrong.


Viewing all articles
Browse latest Browse all 13067

Trending Articles