Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance forum
Viewing all 1453 articles
Browse latest View live

script to find the DL count (only the DLs like *ico*), and the DL s are nested or not.

$
0
0

For a DL clean up activity I am looking a for a script to find the DL count (only the DLs like * and the DL s are nested or not. 

$distgroups = @(Get-DistributionGroup -ResultSize Unlimited) |where {$_.DisplayName -like '*.ICO*'}
foreach ($dg in $distgroups)
{
    $count = @(Get-ADGroupMember -Recursive $dg.DistinguishedName).Count

    $reportObj = New-Object PSObject
    $reportObj | Add-Member NoteProperty -Name "Group Name" -Value $dg.Name
    $reportObj | Add-Member NoteProperty -Name "DN" -Value $dg.distinguishedName
    $reportObj | Add-Member NoteProperty -Name "Manager" -Value $dg.managedby.Name
    $reportObj | Add-Member NoteProperty -Name "Member Count" -Value $count

    Write-Host "$($dg.Name) has $($count) members"

    $report += $reportObj

}
$report | Export-CSV -Path $myDir\DistributionGroupMemberCounts.csv -NoTypeInformation


 tried with this script but no success. can anyone help?




modifying management Scope

$
0
0

Hello Cool People, 

I'm trying to modify an existing management scope  to change the recipientrestriction fillter to a new mailbox. 

Set-ManagementScope -Name "My Custom Scope" -RecipientRestrictionFilter {Name -eq "New Mailbox"}

But as soon as I hit enter, it prompts me with this:

cmdlets Set-ManagementScope at command pipeline position 1
Supply values for the following parameters:
Idenity:

I have done this a couple of times before and its just now where it prompts for this. What Information does the "Identity"needs

Search a EMail with Date Rage & Subject Exchange 2013 With Shell Command

$
0
0

Hi All,

I am trying to search and delete an particular email from All Users Mailboxes(Of my organization) in a particular date range; Subject and Body. Need some help with get some power shell command for Exchange 2013.

1. Need a shell command to search or delete an email from All Users Mailboxes(Of my organization) with the Subject and date range together in same shell command.

2. Need a shell command to search or delete an email from All Users Mailboxes(Of my organization) with the Body and Date range together in same shell command.

3. Need a shell command to search or delete an email from a database with the Subject and Date range together in same shell command.

4. Need a shell command to search or delete an email from a database with the Subject.


Thanks

Health Mailboxes not created after restarting Microsoft Exchange Health Manager

$
0
0

HI All 

My first foray into the forums.

have a 3 exchange 2013 mailbox and 2 CAS servers.  at CU22.  I am using these as Test servers.

1. Stopped the Health service, Disabled the Health Mailboxes. Then deleted all the accounts in the Monitoring Folder in AD.

2. Restarted the Microsoft Exchange Health Manager service. - Nothing 

3. Restarted the Server- Nothing

4. Tried setting the 'Microsoft Exchange Health Manager service' to use a username and p/w still the health mailboxes do not appear.

5. tried running an ADprep and domain prep to no avail. 

system32>Get-ServerHealth srvmbx01 | where {$_.alertvalue -ne "Healthy"}

State           Name                 TargetResource       HealthSetName   AlertValue ServerComp
                                                                                    onent
-----           ----                 --------------       -------------   ---------- ----------
NotApplicable   ClusterNetworkMon... srvMBX01          Clustering      Unknown    None
NotApplicable   OwaTooManyWebAppS... OWA                  OWA             Unknown    None
NotApplicable   ELCPermanentMonitor  Compliance           Compliance      Unknown    None
NotApplicable   UMGrammarUsageMon...                      UM.Protocol     Unknown    None
NotApplicable   owaUsersLockedOut... owa                  UserThrottling  Unknown    None
NotApplicable   MailboxDeliveryAv...                      MailboxTrans... Disabled   None
Online          Transport.NDRForU... HubTransport         HubTransport    Disabled   HubTran...
Online          TransportLogGener...                      HubTransport    Disabled   HubTran...
Online          TransportCategori...                      HubTransport    Disabled   HubTran...
Online          FederatedDecrypti...                      HubTransport    Disabled   HubTran...
Online          TransportDelivery...                      HubTransport    Disabled   HubTran...
Online          TransportDelivery...                      HubTransport    Disabled   HubTran...
NotApplicable   TransportDelivery...                      MailboxTrans... Disabled   None
Online          IsMemberOfResolve...                      HubTransport    Disabled   HubTran...
Online          IsMemberOfResolve...                      HubTransport    Disabled   HubTran...
Online          Transport.DomainS... HubTransport         HubTransport    Disabled   HubTran...
Online          Transport.DomainS... HubTransport         HubTransport    Disabled   HubTran...
Online          TlsDomainClientCe... HubTransport         HubTransport    Disabled   HubTran...
Online          Transport.DomainS... HubTransport         HubTransport    Disabled   HubTran...
Online          Transport.DomainS... HubTransport         HubTransport    Disabled   HubTran...
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None
NotApplicable   DiscoveryErrorRep...                      FfoMonitoring   Disabled   None

One of the mailbox servers was still at CU21 so I upgraded that to CU22 as well, did not help.

Any help to get these Health Mailboxes up will be appreciated

Thanks Anil

bulk rename Dl

$
0
0

i am using this cript to rename the DL but this one only renamed AD Name. not the name of the mailbox

also, other properties like, mbx  Alias, Name, email id are not updated. can anyone please suggest ?

$grp=Import-Csv c:\Grouplist.csv

foreach($gnamein $grp){Get-DistributionGroup $gname.oldName|Set-DistributionGroup-Name $gname.newName}

Cannot Delete Database due to unknown mailboxes

$
0
0

Hi team, 

I've run into a situation where I have moved all mailboxes (arb,archive etc.) but unable to delete the database. However, running the 'Get-MailboxDatabase <DB NAME> | Get-MailboxStatistics | Where {$_.DisconnectReason -ne $null}' shows me the below;

DisplayName                                                 MailboxGuid
-----------                                                 -----------
SystemMailbox{a0d85ace-9060-45a9-9f94-fe7e9d5020cd}         0bb17fc5-d6de-4e59-a9a5-3c43368f2f7b
HealthMailbox-<server-name-db-name>                    fa981ae2-c98b-4372-82c2-2cb7684e7c73

..... there are 14 more like these.......

Something to note is that the 'DisconnectReason' is blank/empty.

DisplayName      : In-Place Archive - HealthMailbox-<servername>
DisconnectReason :
DisconnectDate   :
MailboxGuid      : 69829e12-f7e9-437c-9a7c-82bb1cs8aa39
Database         : MDB01

Running the below command also does nothing to the above

Update-StoreMailboxState -Database MDB01 -Identity 69829e12-f7e9-437c-9a7c-82bb1cs8aa39

How can I get these removed? What are the impacts in the deletion method?

*System mailboxes(Arbitration) are already in a different database.

Thank you.

Jude


Event ID 3028 MSExchangeApplicationLogic

$
0
0

Hi,

I have a problem where Event ID 3028 Source MSExchangeApplicationLogic is beeing logged every 6 hours with 4 same type of events. Here is the log:

Scenario: ProcessKillBit. Failed to read killbit list file because of exception System.IO.IOException: The process cannot access the file 'C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa\prem\15.0.995.29\ext\killbit\killbit.xml' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
   at Microsoft.Exchange.Data.ApplicationLogic.Extension.KillBitHelper.TryReadKillBitFile(Int32& refreshRate, DateTime& lastModifiedTime)

The environment is single virtual MS Exchange 2013 server running on Windows 2012 R2. DC is running on a separate server.

I can't seem to find any articles or blogs relating to this issue.

Thanks for any help.

Accessing all mails of the mailboxes

$
0
0

I want to get email specific information for all the mailboxes I have. Chiefly I'm interested in the size and time of every mail.

Currently, I run the following in my Powershell:

$mailboxes = Get-Mailbox -ResultSize unlimited

foreach ($box in $mailboxes) {
  # This gives me the mailbox for a single user
  $singleBox = Get-Mailbox -identity $box.UserPrincipalName

  # How do I get all the emails in $singleBox?
  Get-Message ....
}

I want to get the sizes of all the emails filtered via time, say size of all emails older than 60 days.

Is there any other way to achieve the result?


Exchange Break after windows update.

$
0
0

Hello Cool People,

We had install windows update  to our MS Exchange 2013 server and after the reboot, one of the MDB is not starting up and with a failed status. Accessing OWA gives this error:


X-OWA-Error: SDServerErr;Microsoft.Exchange.Data.Storage.MailboxOfflineException
X-OWA-Version: 15.0.1367.9
X-FEServer: JTBOSEXCHMAIL01

ECP can be access though.  I hope someone can shed some light on this issue. 

Best,


Search-Mailbox Succeeds, sends me email. Shows 0 Items

$
0
0

I'm running a basic Search-Mailbox same as this one: 

Search-Mailbox -Identity "Persons Name of mailbox i'm searching" -SearchQuery 'Subject:"test email delete"' -TargetMailbox "Myself" -TargetFolder "FolderName" -LogOnly -LogLevel Full

I've sent them an email with the subject line that i'm searching for. 

The search runs and sends me an email saying it's succeeded but it shows 0 items. one other weird thing is that the title's time is way off of our normal time. in the log it says

Start time: 6 hours later than the actual time.

I also noticed that Reseeding of all our Index's is required. Could that be the main issue? I know the syntax is correct, as that example is straight from https://docs.microsoft.com/en-us/office365/securitycompliance/search-for-and-delete-messagesadmin-help 

Any help would be greatly Appreciated. 

Thanks! 

Migration Mailbox from Server1 to Server2 on premisis within the same domain

$
0
0

When i try to move an Mailbox from database on server1 to target database on server2 using EAC i select Mailbox and on the right pane i click Move Mailbox to another database and i use the following command on exchange power shell: Get-MigrationBatch -Identity 'Batch_name' to check migration status and it Completed also on the EAC is Completed, After a while when i check this mailbox i found that it return back on it's original Database ?!!!

I don't know what is the problem exactly.


All mailbox report

$
0
0

I am trying to export all the mailbox in our environment with the following field.

Name

DisplayName

SamAccountName

EmailAddresses

PrimarySmtpAddress

Database

TotalItemSize

ItemCount

Can anyone please check if the below script is correct or not?

 

$report = @()
$Mbxs = Get-Mailbox -resultsize unlimited
foreach ($Mbx in $Mbxs)
{
   $TotalItemSize = (Get-MailboxStatistics $Mbx).TotalItemSize
   $ItemCount  = (Get-MailboxStatistics $Mbx).ItemCount

    $reportObj = New-Object PSObject
    $reportObj | Add-Member NoteProperty -Name "Name" -Value $mbx.Name
    $reportObj | Add-Member NoteProperty -Name "DisplayName" -Value $mbx.DisplayName
    $reportObj | Add-Member NoteProperty -Name "SamAccountName" -Value $mbx.SamAccountName
    $reportObj | Add-Member NoteProperty -Name "EmailAddresses" -Value $mbx.EmailAddresses
    $reportObj | Add-Member NoteProperty -Name "PrimarySmtpAddress" -Value $mbx.PrimarySmtpAddress
    $reportObj | Add-Member NoteProperty -Name "Database" -Value $mbx.Database
    $reportObj | Add-Member NoteProperty -Name "TotalItemSize" -Value $TotalItemSize
    $reportObj | Add-Member NoteProperty -Name "ItemCount" -Value $ItemCount
    $report += $reportObj

}

 


Question on Federation Trust Certificate Exchange 2013

$
0
0

I have a exchange server 2013 that has the Federation Trust Certificate that expired.I am wondering if it safe to remove as we don't have a secondary server or hybrid setup (that I am aware of, their just 1 server).

When i run:

Get-FederationTrust

Name                 ApplicationIdentifier     ApplicationUri
----                 ---------------------     --------------
Microsoft Federat...

Is it safe to remove it just from EAC panel or should I be worried?I can't renew it when it hadn't expired as I was doing the following:

However when I get to this command:

Text
[PS] C:\Windows\system32>Set-FederationTrust -Identity "Microsoft Federation Gateway" -Thumbprint <THUMBPRINT> -RefreshMetaData

I get a error saying "Cannot update certificate until the federation trust is provisioned with STS."

Our main certificate for SSL is through godaddy and everything else seems fine from what I can tell. Not sure if I should remove it through EAC or just leave it and let it keep telling me it has expired.



After applying CU 22, EWS virtual directory Exchange.asmx 'landing page' continuously prompts for credentials

$
0
0

After installing CU 22 for Exchange 2013 Standard, our third-party Symantec Mail Security product can no longer carry out antivirus scans.  That product is installed directly on the server.  The vendor examined the server, and observed that when https://mail.customername.com/ews/exchange.asmx is accessed from a web browser on the Exchange server, the browser prompts for credentials to authenticate over and over, even when valid credentials are specified (we tried 2 different usernames/passwords).  Eventually, a blank page loads.  

If that same URL is accessed from a browser on another computer on the network, the authentication succeeds and the default "Service--You have created a service.  To test this service [...]" landing page loads. Again, we used two different sets of valid credentials to confirm.

Checked the EWS virtual directory, it's https://mail.customername.com/ews/exchange.asmx for both internalURL and externalURL, as it should be.

Back on the server, the vendor had us configure their product to use https://servername.local/ews/exchange.asmx instead of https://mail.customername.com/ews/exchange.asmx, and Symantec started working again.  Sure enough, if you browse to https://servername.local/ews/exchange.asmx on the server, and authenticate when prompted, you get right through to the test page.  Using the other URL still fails.

Here's why I'm pointing to CU 22 as the possible culprit: we restored a month-old backup of this Exchange server, running CU 20, and browsing to https://mail.customername.com/ews/exchange.asmx and authenticating lets us right in to the landing page, no problem.

It's probably obvious since we do manage to get prompted for credentials, but I should note that the server with CU22 is able to resolve the URL that doesn't work in DNS, so it's not a DNS issue.

Exchange 2013 CUs can't be rolled back--what should I do to correct this?  Symantec characterized their solution as a 'workaround', and said we should investigate whether something went wrong with the CU.

Thanks!


Unable to Change Profile photo

$
0
0

Hi All,

We have Exchange 2013 and we can not change profile photo of users from exchange ECP console. We only can change photos for users whose my account page looks like attached snapshot. Kindly help.

Regards,

Gaurang Dhanak

SME


Outlook is removing [EXT] while replying or forwarding

$
0
0

Hi,

We have set the rule for appending [EXT] for all incoming external emails and its working fine. However, We want to remove [EXT] while replying or forwarding to that email address.

One thing, I noticed that Outlook strips the [EXT] while clicking reply or forward for hotmail.com and outlook.com but not for other domains. No Macro is in use and checked on other Outlook as well with a different user.


Ankit Singh

Can you store the Mailbox Databse on a remote server?

$
0
0

Hi Everyone, 

New to here, but got a question. I  am having space issues with our Exchange 2010 server, and i am wondering if i can move the database ta shared folder on another PC and change the path in exchange. Will this work? Please let me know. 

Thank you 

Scott

Scheduled script is not running

$
0
0

Scheduled a task using the below script but the task is running but not generating the file.

When i run it normally it is working perfectly. could anyone please help? or guide me how to split this to two part. like one script is to generate the file and the other one is to send the file.

i need to run this script on last Saturday of every month

$report = @()
$file = "Path\MbxReport _$((Get-Date).ToString('MM-dd-yyyy_hh-mm-ss')).csv"
$Mbxs = Get-Mailbox -ResultSize unlimited | Select-Object -First 5
foreach ($Mbx in $Mbxs)
{
   $TotalItemSize = (Get-MailboxStatistics $Mbx).TotalItemSize
   $ItemCount  = (Get-MailboxStatistics $Mbx).ItemCount
   $email= get-mailbox $mbx | select @{Name='EmailAddresses'; Expression={$_.EmailAddresses -join ","}}

    $reportObj = New-Object PSObject
    $reportObj | Add-Member NoteProperty -Name "Name" -Value $mbx.Name
    $reportObj | Add-Member NoteProperty -Name "DisplayName" -Value $mbx.DisplayName
    $reportObj | Add-Member NoteProperty -Name "Alias" -Value $mbx.Alias
    $reportObj | Add-Member NoteProperty -Name "RecipientTypeDetails" -Value $mbx.RecipientTypeDetails
    $reportObj | Add-Member NoteProperty -Name "SamAccountName" -Value $mbx.SamAccountName
    $reportObj | Add-Member NoteProperty -Name "PrimarySmtpAddress" -Value $mbx.PrimarySmtpAddress
    $reportObj | Add-Member NoteProperty -Name "EmailAddresses" -Value $email
    $reportObj | Add-Member NoteProperty -Name "Location" -Value $mbx.Office
    $reportObj | Add-Member NoteProperty -Name "GWC Journal Exclusion" -Value $mbx.CustomAttribute12
    $reportObj | Add-Member NoteProperty -Name "MBX Retention Policy " -Value $mbx.RetentionPolicy
    $reportObj | Add-Member NoteProperty -Name "Database" -Value $mbx.Database
    $reportObj | Add-Member NoteProperty -Name "TotalItemSize" -Value $TotalItemSize
    $reportObj | Add-Member NoteProperty -Name "ItemCount" -Value $ItemCount
    $reportObj | Add-Member NoteProperty -Name "DistinguishedName" -Value $mbx.DistinguishedName
    $reportObj | Add-Member NoteProperty -Name "LegacyExchangeDN" -Value $mbx.LegacyExchangeDN
    $reportObj | Add-Member NoteProperty -Name "WhenMailboxCreated" -Value $mbx.WhenMailboxCreated
    $reportObj | Add-Member NoteProperty -Name "OrganizationalUnit" -Value $mbx.OrganizationalUnit

    $report += $reportObj

}
$report | Export-Csv -path $file -NoTypeInformation

$SendMail = @{
    'SmtpServer' = "smtp-*****" 
    'To' = "*****" 
    'From' = "MonthlyMBXReport@iconplc.com" 
    'Subject' = "Monthly Report" 
    'Attachments' = $file  
}

Send-MailMessage @SendMail



Search-mailbox specifying between certain times

$
0
0

I am trying to setup a Search-Mailbox command to look between certain times:

 Search-Mailbox $Check_user -SearchQuery "(subject:`"$MessageSubject`")AND(from:`"$SenderEmail`")AND(Received:`"$Start_date..$End_date`")"

$Start_date = "03/27/2019 09:40:00"

$End_date  = "03/27/2019 09:50:00"

The date part works fine, but it seems to be ignoring the time part. If the message was delivered at 09:16 giving the above times it will find the message, same as if I put 09:10 and 09:20.

Looking at the documentation using the YYYY-MM-DDThh:mm:ssZ format (https://docs.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference) it still seems to ignore the time wither specified in Central time zone or UTC time zone.

Purging SMTP Address associated with a specific mailbox

$
0
0

Hello,

I have  an exchange mailbox that has 1100+ email alias associated to it.  Half of those email aliases are no longer in use and I  want to delete them.  Manually deleting them sounds very tedious. Is there a quick way to delete them based on a .csv list? 

Thanks,

Viewing all 1453 articles
Browse latest View live


Latest Images

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