Solved

Output Exchange 2010 Power Shell List to Text File

Posted on 2012-04-02
3
1,150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

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 40

Expert Comment

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

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

733 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