Output Exchange 2010 Power Shell List to Text File

I use the following commands to add domains to my Exchange 2010 Bypassed Sender Domains list.  However, when I just type in $list, it takes a while for it to populate in the PS window, I would like to have a command to export this list to a file.  Please provide the commands to export contents of the $list to a txt file.  I am not very fluent in powershell programming, so I would need the entire command.  Thank you.

$list = (Get-ContentFilterConfig).BypassedSenderDomains
$list.add(“test100.com”)
set-contentfilterconfig -BypassedSenderDomains:$list
LVL 1
fireguy1125Asked:
Who is Participating?
 
Adam BrownConnect With a Mentor Sr Solutions ArchitectCommented:
In powershell, the > and >> symbols note an output to file command (The easy way). If you do

$list >> <filename>

it will write the contents of that variable to the file specified.
0
 
fireguy1125Author Commented:
Thank you, it worked, however no < > around the file name.
0
 
Adam BrownSr Solutions ArchitectCommented:
Yeah. I always use those as a "Put something else here" notation :D
0
All Courses

From novice to tech pro — start learning today.