Showing posts with label OnMicrosoft. Show all posts
Showing posts with label OnMicrosoft. Show all posts

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).