Solved

Output Exchange 2010 Power Shell List to Text File

Posted on 2012-04-02
3
1,126 Views
Last Modified: 2012-04-02
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
0
Comment
Question by:fireguy1125
  • 2
3 Comments
 
LVL 38

Accepted Solution

by:
Adam Brown earned 500 total points
ID: 37797904
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
 
LVL 1

Author Closing Comment

by:fireguy1125
ID: 37797932
Thank you, it worked, however no < > around the file name.
0
 
LVL 38

Expert Comment

by:Adam Brown
ID: 37797935
Yeah. I always use those as a "Put something else here" notation :D
0

Featured Post

Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now