Category: PowerShell 101

Powershell to track email sent to specific mailbox or DL in Exchange 2010

I ran across a requirement where in I had to find out whether the emails generated from one mailbox were getting delivered to the recipient mailbox successfully or not. As you must be aware that all the mails that are sent or received in an Exchange organization has to be routed from the Hub Transport […]

Read More »

Access Exchange Online via PowerShell

After recently deploying a hybrid configuration for Office 365, many email settings that were easily configurable within Office 365 portal could not be changed as these settings were being managed by on-premise Active Directory servers. To get past this restriction, the next best option is to access the Exchange Online via PowerShell. Note: PowerShell 3.0 […]

Read More »

PowerShell: Get Last Logon For All Users Across All Domain Controllers

Here is a quick PowerShell script to help you query the last logon time for all of your users across all of your domain controllers. It will also save the output to a .csv file specified in the $exportFilePath string. I was surprised not to find many examples of this across the web already. Either […]

Read More »

User’s Receive a Message Stating that “User” Has Forwarded Your Meeting Request to Additional Recipients

I recently ran into a problem where some user’s were beginning to receive email messages from Exchange, informing them that their Meeting Request’s were being forwarded to additional recipients. See below for the fix.   Exchange 2007 Verify the setting is turned on or off: Get-MailboxCalendarSettings user | fl  Remove the setting: Set-MailboxCalendarSettings rscherer –RemoveForwardedMeetingNotificiations:$true  […]

Read More »

Restart a Service Remotely Using PowerShell on Multiple Servers

I threw a quick PowerShell function together that would allow me to restart one service on 1 or more servers in one command.  I hadn’t found an easy way to do this in PowerShell before so I threw this together.  What I did was pasted the function code into my PowerShell profile at c:\users\%USERNAME%\Documents\WindowsPowershell\Microsoft.PowerShell_profiles.ps1 to […]

Read More »

Unable to Migrate User to O365 – “Target user already has a primary mailbox”

If you run into an issue where a user has both a mailbox in Exchange on-premise and O365, and you cannot migrate the account to O365. Error: “Target user already has a primary mailbox”   FIX: Remove the O365 account and then do a full DirSync.  Once done, migrate the on-prem mailbox to O365.   […]

Read More »

Delete a Calendar item from a mailbox

If you have the need to remove a specific calendar event/appointment from a mailbox, you can do it through Power Shell or Exchange Management Shell.   Open PowerShell or EMS If this is an O365 mailbox, you will need to connect to the O365 environment Connect to Exchange On-line From the PowerShell console on an […]

Read More »

Delete emails from specific sender in one users mailbox

1.  Connect to Exchange On-line From the PowerShell console on an Exchange 2010 server: $Cred = Get-Credential  $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection  Import-PSSession $s    Run this command in Powershell   Search-Mailbox -identity “User Mailbox” -SearchQuery “From:user@domain.com” -deletecontent 

Read More »

FashionBuzz © 2015 | All Rights Reserved Theme by Flythemes