Quantcast
Channel: Exchange Server 2010 forum
Viewing all 15005 articles
Browse latest View live

Export invoices to directory and move mail to outlook process folder - Powershel

$
0
0

Dear all,

I have created a powershel script to export invoices to our directory.

################################################
#
#Accept any certificates presented by the CAS
#
################################################

## Create a compilation environment
$Provider=New-Object Microsoft.CSharp.CSharpCodeProvider
$Compiler=$Provider.CreateCompiler()
$Params=New-Object System.CodeDom.Compiler.CompilerParameters
$Params.GenerateExecutable=$False
$Params.GenerateInMemory=$True
$Params.IncludeDebugInformation=$False
$Params.ReferencedAssemblies.Add("System.DLL") | Out-Null

$TASource=@'
  namespace Local.ToolkitExtensions.Net.CertificatePolicy{
    public class TrustAll : System.Net.ICertificatePolicy {
      public TrustAll() { 
      }
      public bool CheckValidationResult(System.Net.ServicePoint sp,
        System.Security.Cryptography.X509Certificates.X509Certificate cert, 
        System.Net.WebRequest req, int problem) {
        return true;
      }
    }
  }
'@ 
$TAResults=$Provider.CompileAssemblyFromSource($Params,$TASource)
$TAAssembly=$TAResults.CompiledAssembly

## We now create an instance of the TrustAll and attach it to the ServicePointManager
$TrustAll=$TAAssembly.CreateInstance("Local.ToolkitExtensions.Net.CertificatePolicy.TrustAll")
[System.Net.ServicePointManager]::CertificatePolicy=$TrustAll

################################################
#
#Load the EWS API and connect to the CAS/EWS
# EWS API is found at: http://www.microsoft.com/en-us/download/details.aspx?id=28952
#
################################################

## Load Managed API dll
Add-Type -Path "C:\Program Files\Microsoft\Exchange\Web Services\2.0\Microsoft.Exchange.WebServices.dll"

## Set Exchange Version (Exchange2010, Exchange2010_SP1 or Exchange2010_SP2)
$ExchangeVersion = [Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP2

## Create Exchange Service Object
$service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService($ExchangeVersion)

## Set Credentials to use two options are availible Option1 to use explict credentials or Option 2 use the Default (logged On) credentials
#Credentials Option 1 using UPN for the windows Account
$creds = New-Object System.Net.NetworkCredential("username","password","domainname") 
$service.Credentials = $creds  

#Credentials Option 2
#service.UseDefaultCredentials = $true

## Set the URL of the CAS (Client Access Server) to use two options are availbe to use Autodiscover to find the CAS URL or Hardcode the CAS to use

$MailboxName = "invoice@mailbox.nl"

#CAS URL Option 1 Autodiscover
#$service.AutodiscoverUrl($MailboxName,{$true})
#"Using CAS Server : " + $Service.url 

#CAS URL Option 2 Hardcoded  
$uri=[system.URI] "https://vsfl01.domain.nl/ews/Exchange.asmx"
$service.Url = $uri  


#Bind to the Inbox folder
$Sfha = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+IsEqualTo([Microsoft.Exchange.WebServices.Data.EmailMessageSchema]::HasAttachments, $true)
$folderid= new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Inbox,"invoice@mailbox.nl")   
$Inbox = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,$folderid)  

####################################################################################################
#
#This section finds attachments and copies the attachment to the download directory
#
####################################################################################################


$ivItemView = New-Object Microsoft.Exchange.WebServices.Data.ItemView(100)
$downloadDirectory = "\\directory\Company\_Incomming"

$findItemsResults = $Inbox.FindItems($Sfha,$ivItemView)
foreach($miMailItems in $findItemsResults.Items){
	$miMailItems.Load()
	foreach($attach in $miMailItems.Attachments){
		$attach.Load()
		$fiFile = new-object System.IO.FileStream(($downloadDirectory + “\” + $attach.Name.ToString()), [System.IO.FileMode]::Create)
		$fiFile.Write($attach.Content, 0, $attach.Content.Length)
		$fiFile.Close()
		write-host "Downloaded Attachment : " + (($downloadDirectory + “\” + $attach.Name.ToString()))
	}
}

####################################################################################################
#
#This section moves emails from the Inbox to a subfolder of "Inbox" called "PROCESSED", make sure to 
#create the folder.
#
####################################################################################################

#Get the ID of the folder to move to  
$fvFolderView =  New-Object Microsoft.Exchange.WebServices.Data.FolderView(100)  
$fvFolderView.Traversal = [Microsoft.Exchange.WebServices.Data.FolderTraversal]::Shallow;
$SfSearchFilter = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+IsEqualTo([Microsoft.Exchange.WebServices.Data.FolderSchema]::DisplayName,"PROCESSED")
$findFolderResults = $Inbox.FindFolders($SfSearchFilter,$fvFolderView)  
#Define ItemView to retrive just 100 Items    
$ivItemView =  New-Object Microsoft.Exchange.WebServices.Data.ItemView(100)  
$fiItems = $null    
do{    
    $fiItems = $Inbox.FindItems($Sfha,$ivItemView)   
    #[Void]$service.LoadPropertiesForItems($fiItems,$psPropset)  
        foreach($Item in $fiItems.Items){      
            # Copy the Message  
            #$Item.Copy($findFolderResults.Folders[0].Id)  
            # Move the Message  
            $Item.Move($findFolderResults.Folders[0].Id)  
        }    
        $ivItemView.Offset += $fiItems.Items.Count    
    }while($fiItems.MoreAvailable -eq $true)  

This script is working great but I have a few wishes.

  1. Attach the domain name to the exported filename, this because we want to know who send the attachment. For example, if we receive e-mail from: info@flowershop.com we want to add flowershop to the filename. : invoice124343-flowershop
  2. Is it possible to only export the PDF and XLS, XLSX files?, because now I am downloading all attachements including signatures .jpg files.

I hope somebody can help me with this script.


Friendly regards,

Pascal


Current situation with Exchange 2010 and .NET - How to update my servers?

$
0
0
Hey Guys,

we are still utilizing Exchange 2010 it is very odd to exclude all the .NET updates all the time.
We do our update management via SCCM. Unfortunately there are less current news about Exchange 2010
and .NET, if I remind correctly the last really supported version is 4.6.1

I think the situation is stupid anyway as Exchange 2010 is only using the .NET 3.5 libraries, but MS
is shouting out anyway please do not install .NET 4.6.2 and higher.

We used one of these blocking registry keys in the past I guess for 4.5.1 and afterward we were allowed
to install it.

Due to these cumulative updates especially with .NET it is getting more and more frustrating.

I just want to run a simple windows update (via SCCM).
So I would like to block all the newer versions. How will SCCM behave?

Will some cumulative updates disappear?

Security Only updates for .NET Framework 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, and 4.7.2 for Windows 7 SP1 and Server 2008 R2 SP1

Or will my server recognize the whole CU as applicable, but will only install the updates in it for all
versions which I have not blocked?

I hope this is the correct forum to ask, otherwise I have to switch to SCCM or .NET ?!

Thanks in advance.

Kind regards,
Christian

How to upgrade Storage of Exchange Server.

$
0
0

Hi,

This is regarding Upgrading Storage attched to Exchange Server nodes.

We have two Node Exchange Server Entp 2010 configured with CAS and DAG.

Due to limited storage capacity of exisiting DAS devices - we are planning to put new DAS with bigger Storage capacity, can somebody share their thougts on how do we go ahead with this.

-Atul A


TheAtulA

Exchange 2010 with OWA Access Log Auditing

$
0
0

Is there a way to determine exactly which emails were accessed in Exchange 2010 when the Outlook Web Access client is used. We have the IIS logs for OWA but the messageID is not logged, we only see ConversationIDs and CorrelationIDs.

OWA Options/Settings/Mail is blank

$
0
0

EX2010 SP3

All features of OWA work except if you click Options, then Settings, then Mail. That page is blank. All other pages are normal. How can I fix this?

TIA

Exchange 2010 Seeding - Old storage to New Storage

$
0
0

Hey folks

I have a 600GB *seeded* 3rd Copy Database that is in the failed state. It is the 3rd copy I've created, this one is on brand new SSD storage and I'm going to be bunny-hopping onto this new storage eventually by removing the older DB copies.

Anyway, It seeded overnight but is reporting as failed this morning, and the Content Index is *crawling*.Is this expected, Do I just need to wait for the index to slowly crawl through?

Some notes to add:

1. The other 2 Active and passive copies are both healthy as are their indexes.

2. The server that I have placed this third copy onto is in a *blocked policy* activation state, I don't want the copy coming online at any stage yet.

3. I began the Seeding process by using the GUI and *adding a new DB Copy*. About 2 hours in I decided to follow a different approach. I cancelled the process, suspended the third copy, went into the Exchange Management Shell (EMS) and ran anUpdate-Mailboxdatasecopy - databaseonly  command.

(At the stage whereI did point 3 above, the EMS did say that it take Exchange 15 minutes to cleanup the cancelled Add-MailboxDB, did I want to perform that process now while running Update-MailboxDatabase.......I said yes)

The reason for point 3 was I didn't want the ContentIndex to be created as part of this Seed process (a number of WEB posts refer to a SEED rollback if the ContentIndex fails).......and yet......the contentIndex is crawling this morning and the 3rd Copy is Failed?!?

Is this just a waiting game....or has the process gone wrong do you think?

Coop

Using Powershell to Delete Emails in a Mailbox Based on Timestamp NOT Accurate Enough

$
0
0

Hi All,

Scenario:
Exchange 2010 SP3 w/ RU 16
I have an several emails that were delivered to a mailbox.   Email A, B, C, & D.
They have same sender and subject as other emails for that day
I want to delete emails B & C that were sent within a specific time range for that Day
Emails A & D should remain.

Here's the problem...
If I specify a date and time range to delete emails B & C, it sometimes doesn't delete them even though my date/time window is large enough.  I sometimes have to specify a window that is +/- 20 minutes greater then when the emails were received or delivered but then sometimes this deletes A & D as well.

It appears that the script isn't parsing or interpreting the date/time accurately or it is using a field I am unaware of.

Here's the Powershell command I'm using:

Search-Mailbox -identity JDoe -SearchQuery Received:"08/09/2018 08:50..08/09/2018 09:24" -Delete
Content -force

FYI, Get-Date Output:
Wednesday, August 22, 2018 11:30:33 AM

Thanks for the help :-)


An attempt was made to reset an account's password for Exchange 2010 Database account?

$
0
0

Hi,

I've never seen this before.  Why would there be an attempt to reset an account password of our Exchange 2010 DAG database? I didn't even know that DAG uses an account (for example, "CORP.DAG$"). I know that SQL does this from time to time but never seen in Exchange.  Is this something routine or normal?

21 Aug 2018  06:58:13 PM    
Computer: [DOMAIN CONTROLLER]    
Monitor: [A User Account was changed]    
Description:     
* Event Time: 21 Aug 2018 06:57:28 PM    
* Source: Microsoft-Windows-Security-Auditing    
* Event Log: Security    
* Type: Audit Success    
* Event ID: 4724    
* Event User: N/A    
* An attempt was made to reset an account's password.    

Subject:    
Security ID: DOMAIN\CORP.DAG$ {S-1-5-21-xx}    
Account Name: CORP.DAG$    
Account Domain:DOMAIN    
Logon ID: 0x6xx    

Target Account:    
Security ID: DOMAIN\CORP.DAG$ {S-1-5-21-xx}    
Account Name: CORP.DAG$   
Account Domain:DOMAIN   

            



Exch 2010 systemMBX folders

$
0
0

Team,

Kindly advise, on how to move the SystemMBX public folderfrom one server to another as we are planning to decommission the existing server.

Environment - Exch 2010

iti have

$
0
0

I have problem in exchange 2016 ,

database is mandatory on use mailbox

mobile devices cannot connect to exchange 2010 server

$
0
0

Hello,

My client has an exchange 2010 server, with all roles, which was working fine.

they have recently grown and the old server is running out of space.  We have setup another 2010 server for the databases and are in the process of moving the databases to that server.

the problem:

all desktops are working fine, outlook, webmail connects with no issues, but mobile (phone/tablet) users stopped working?  the devices cannot connect to the server??

I will be moving them to O365 soon but meanwhile I need them to connect?? what am I missing?

thanks

ActiveSync Proxy Error 401 2 5

$
0
0

Hi

In my Exchange 2010 SP3 environment, i have devices that are intermittently taking a long time to receive email. 

When looking at the CAS server IIS logs, i see error 401 2 5 ........

8/6/2018 17:19:45 POST /Microsoft-Server-ActiveSync/Proxy Settings Cmd=Settings&User=user.user%40XXX.com&DeviceId=BC0C4A3AFE594B27B21A94F8F9D04CFB&DeviceType=GoodiPhone - 10.169.30.4 Good3-2.13.0.4015-iPhone10C3/iOS11.4.1/2BD67598DC1C475ABA5DEB1FE exchangecookie=6ce7b039050445c0962c7a897cf8b0f3 401 2 5

8/6/2018 17:19:46 POST /Microsoft-Server-ActiveSync/Proxy Sync Cmd=Sync&User=user.user%40XXX.com&DeviceId=BC0C4A3AFE594B27B21A94F8F9D04CFB&DeviceType=GoodiPhone - 10.169.30.4 Good3-2.13.0.4015-iPhone10C3/iOS11.4.1/2BD67598DC1C475ABA5DEB1FE exchangecookie=6ce7b039050445c0962c7a897cf8b0f3 401 2 5

Although, i can see around 20 seconds later, on a different server, the device manages to connect successfully....

8/6/2018 17:20:05 POST /Microsoft-Server-ActiveSync/default.eas Settings Cmd=Settings&User=USER.USER%40XXX.com&DeviceId=BC0C4A3AFE594B27B21A94F8F9D04CFB&DeviceType=GoodiPhone&Log=PrxTo:email2.XXX.com_V141_LdapC4_LdapL16_UserInfo:UserMailbox_Mbx:FCL-EXC-V526.XXX.com_Dc:FCL-ADC-V002.XXX.com_Budget:(D)Conn%3a1%2cHangingConn%3a0%2cAD%3a%24null%2f%24null%2f0%25%2cCAS%3a%24null%2f%24null%2f0%25%2cAB%3a%24null%2f%24null%2f0%25%2cRPC%3a%24null%2f%24null%2f0%25%2cFC%3a1000%2f0%2cPolicy%3aIncreased+ActiveSync+Devices%2cNorm%5bResources%3a(DC)FCL-ADC-V002.XXX.com(Health%3a-1%25%2cHistLoad%3a0)%2c%5d_ XXX.com\rgaffin 10.121.30.4 Good3-2.13.0.4015-iPhone10C3/iOS11.4.1/2BD67598DC1C475ABA5DEB1FE exchangecookie=6ce7b039050445c0962c7a897cf8b0f3 200 0 0

8/6/2018 17:20:06 POST /Microsoft-Server-ActiveSync/default.eas Sync Cmd=Sync&User=USER.USER%40XXX.com&DeviceId=BC0C4A3AFE594B27B21A94F8F9D04CFB&DeviceType=GoodiPhone&Log=PrxTo:email2.XXX.com_V141_LdapC1_Mbx:FCL-EXC-V526.XXX.com_Budget:(D)Conn%3a1%2cHangingConn%3a0%2cAD%3a%24null%2f%24null%2f0%25%2cCAS%3a%24null%2f%24null%2f0%25%2cAB%3a%24null%2f%24null%2f0%25%2cRPC%3a%24null%2f%24null%2f0%25%2cFC%3a1000%2f0%2cPolicy%3aIncreased+ActiveSync+Devices%2cNorm_ XXX.com\rgaffin 10.121.30.4 Good3-2.13.0.4015-iPhone10C3/iOS11.4.1/2BD67598DC1C475ABA5DEB1FE exchangecookie=6ce7b039050445c0962c7a897cf8b0f3 200 0 0

Any ideas?


Thanks

<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Calibri} </style>

moving user mailbox to another forest

$
0
0
we merged with another company but still running as separated AD/Exchange forest. I need to move user's mailboxes from forest A to forest B. Mailbox only not user's or computer accounts.  So after mailbox moved the users in forest A still can login as usual but just need to restart their Outlook and get connected to the moved mailbox in forest B. Is it possible?  Thanks in advance.

cannot clear InTransit flag

$
0
0
I have a mailbox on Exchange 2010 (fully patched) with the InTransit flag apparently set on a mailbox, indicated by the icon. The right-click menu does not show the 'mailbox move' items

There are no existing move requests for it, although I do have the log, which shows a 'succeeded with warning' message stating that the source mailbox could not be deleted.

The source mailbox is a database which no longer exists.

There is no ExchMailboxMove attribute showing in ADSIEdit.

Now what ?

Subscribing to an Internet calendar in Exchange 2010

$
0
0


Hi --

I'm trying to subscribe an Exchange user to an Internet calendar so that the calendar shows up on his account from any device he's on.

I have been able to successfully subscribe him by adding the calendar as an Internet Calendar in the Account Settings on his desktop PC's Outlook 2016. The calendar was added and populated without a problem, and is regularly updated. However, he cannot see the calendar from any other device; it only shows up in Outlook.

So I logged into his account in OWA and used Add a Calendar from the Internet to add the same calendar, using the identical URL, that he is subscribed to in Outlook. The only change I made is in the display name. The Outlook calendar is labeled "Assignments" and the Exchange calendar is labeled "Assignments (Exchange)." OWA added the calendar to the account.

This worked as far as making that new calendar available everywhere he signs in (including on the mail client on his Android phone). However, it's  been over an hour since I did this, and the new calendar is still empty. It shows a red bar across the top that reads, "(!) This calendar hasn't updated yet. If it doesn't update within 10 minutes, verify the calendar URL by clicking Share in the Calendar toolbar, and then clicking Show Calendar URL." When I do that, I see the same URL that Outlook has. (In fact, I copied and pasted the URL from Outlook.)

Is there something else I need to do?

Thanks

CL



bounced messages

$
0
0

I get Admin with bounced messages because the usage is only 10KB. I want to change it to 10,000.000. How do I do it?

usage amount

$
0
0

usage amount is set at 10KB. home do I raise this? I have tried and tried and am now giving up almost..

multiple ost file per users in outlook 365

$
0
0

I purchased the Office 365 with the exchange host managed by Microsoft. Now I am getting multiple OST-Files per user, by adding sometimes just a number on the end or double named. This is real annoying and uses lots of space on the disk. The files are at the standard folder C:\Users\Berni\AppData\Local\Microsoft\Outlook and have not changed anything. 

Noticed that there was some issues in the past, however, could not find any solution provided, enable to get this issue fixed. Detailed help would be appreciated as I am not a IT specialist. 

missing ms-Exch-Extension-Attribute 1 to 42 for users on a Windows Server 2012 R2 DC

$
0
0

Hello all,

after a Schema extension of a AD forest with Windows Server 2012 R2 domain controller with MSFT Exchange 2010 SP3, alle ms-exch-extension-attributes do exist in AD-Schema starting with 'CN=ms-Exch-Extension-Attribute' but if I check attributes of a user account in root domain of the forest, there are no msexchattribute to find. 

We did run Schema- and Domainprep. In our case we don't install any exchange server 2010. We need only msEA14 for testing of FIM synchronisation. 

I had to choose 'Exchange Server 2013 - Setup, Deployment..' by asking my question in this forum, because Exchange 2010 is out of support. 

Thanks,


Soheil


Public Folder Calendar will not stop sending reminders

$
0
0

I am on Exchange 2010 v14.3 build 123.4, with Outlook 2010. I have a public calendar that a user is setting up appt's with no reminders, but he still is getting reminded on appts. How would I turn these off?

Thanks

Pat

Viewing all 15005 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>