Solved

Output Exchange 2010 Power Shell List to Text File

Posted on 2012-04-02
3
1,120 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This video discusses moving either the default database or any database to a new volume.

747 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

13 Experts available now in Live!

Get 1:1 Help Now