Showing posts with label Microsoft Exchange. Show all posts
Showing posts with label Microsoft Exchange. Show all posts

Thursday, August 15, 2013

Show more details in Calendar (Room Mailbox)

If you made a Room Mailbox for a meeting room and someone wants to see who booked it and more details for that booking you can run the following cmdlet to change the default setting to Reviewer which will give end user more information about that booking.


Set-MailboxFolderPermission meetingroom:\Calendar -User Default -AccessRights Reviewer

Friday, August 9, 2013

Exchange 2010 - Deny User from distribution list to send mails to other distribution list.

This probably sounds crazy but I was asked to do this.

Basically they wanted to stop a users to send emails to all distribution list. Usually used when terminating a user or if the user is being retarded and sending personal emails to all DL's. Whatever it might be I just had to come up with a script to do it to all over 150 DL. I wasn't going to do it one by one from EMC so I made a cmdlet.

Below is the powershell script for exchange 2010 probably works on 2013 as well.

Make a DL called "Denied Users" and add users or user to that DL if you want to block him from sending emails to DL. Please note that this script will only add the Denied User DL in block list once. So if you create a new DL after running this script. Then that DL will not have Denied users in rejected user and hence you will have to re-run the script.

$temp = Get-DistributionGroup -ResultSize Unlimited

foreach($group in $temp)



{
 
Set-DistributionGroup -Identity $group -RejectMessagesFromDLMembers "Denied Users"



}
 
#Remove the above setting incase they change their mind.

#Set-DistributionGroup -Identity $group -RejectMessagesFromDLMembers $null
 
 
 

Friday, September 23, 2011

Enable / Disable Microsoft 365 ActiveSync service for users.

I am currently working on Microsoft 365 cloud exchange. I want to try out different things which will enable and disable the services for users. I found the below post which stats how to enable and disable ActiveSync for users.

Windows Mobiles can be configured for Active Sync. Active Sync is enabled for all users by Default in Exchange 2007 & 2010.

For Security reasons its recommended to disabled all users and enable only for the required users

Below power shell enabled and disabled Active for all the users in the exchange Organization

get-Mailbox -resultsize unlimited | set-CASMailbox -ActiveSyncEnabled:$False

get-Mailbox -resultsize unlimited | set-CASMailbox -ActiveSyncEnabled:$True

Below powershell command to enable and disable active sync for given set of users in the text file

Get-content C:\users.txt | set-CASMailbox -ActiveSyncEnabled:$True

Get-content C:\users.txt| set-CASMailbox -ActiveSyncEnabled:$False

Source : http://powershell.com/cs/forums/p/2619/3506.aspx

Thursday, September 22, 2011

Microsoft 365 Cloud Remote Management

Alright so I been learning how to play with Microsoft 365. In particular management of Exchange server via “Exchange Management Console” and “Exchange Management Shell aka Powershell”.

I found very amazing tutorial on http://technet.microsoft.com/en-us/edge/Video/hh278971 by Naomi Alpern. I watched the whole thing since it was very interesting. But you if you really want to skip it to fun part then skip it to 20 minutes into to tutorial.

First of install "Exchange Management Tools" from Exchange 2010 Sp1 cd. I downloaded mine off microsoft. Extract the files and run the setup from run. Cmd into the folder where exchange 2010 sp1 setup file is located and write "setup /R:MT"

To configure Exchange Management Console do the following steps:-

·         From the “Exchange Management Console” right click on “Microsoft Exchange” and click on “Add Exchange Forest…”

·         You will be prompted with the below dialog box. In “Specify a friendly name for this Exchange forest”. Write whatever is easy to remember for you. I put mine as “Exchange Online”. After that make sure you select “Exchange Online” from the drop down menu of “Specify the FQDN or URL of the server running the Remote PowerShell instance:” Click “OK” and it will ask you for the username and password for your Microsoft 365 account.
·         After you put in your username and password it will refresh the EMC and if it accepts the credentials it will list your exchange forest in the list.

That was the "Exchange Management Console" connection settings. Now for "Exchange Management Shell (PowerShell)"

To connect through PowerShell use the following script
========================================
Set-ExecutionPolicy unrestricted
#Ask for credentials
$cred = Get-Credential
#Setup a powershell session to the Exhcange online server
$O365 = New-PSSession -ConfigurationName Microsoft.Exchange –ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection
#Import the cmdlets to your local computer
$importcmd = Import-PSSession $O365
=============================================

Update : Someone asked me to automate the username and password. So here's the script with username & password already added :-

=============================================
Set-ExecutionPolicy unrestricted
#Change to your username of microsoft 360 below
$userName = "username@domain.onmicrosoft.com"
#Change yourpasswordhere with your password
$passWord = ConvertTo-SecureString "yourpasswordhere" -Force -AsPlainText
$cred = New-Object System.Management.Automation.PSCredential($userName, $passWord)
$O365 = New-PSSession -ConfigurationName Microsoft.Exchange –ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection
$importcmd = Import-PSSession $O365
========================================
The above will connect you to your online cloud exchange server. You can test it out by running exchange commands. get-mailbox or anything else.

That pretty much sums it up. Not much different from your local exchange server. Do keep in mind there are few settings not visible on cloud exchange server since its running multiple clients setup (hosted exchange setup).