Live@EDU Outlook Live – How to get started

Well I found snippets of cmdlet you can use in PowerShell however knowing how a lot of schools have drive by out sourced technicians and librarians/teachers looking after the school network I thought of commenting on what is going on in the scripts;  not everyone has a full time team or administrator in their school.

It looks like the future will consist of schools taking advantage of Live@EDU Outlook Live so I hope this articles can help you in some way.

Recommended Prerequisites


  • Windows Server 2008 with updates and Internet
  • Outlook Live setup with your trusted domains, MX records configured with ISP and Online.
  • Domain.live.com Administrator account details
  • Check the version of Windows PowerShell on your computer.
  • Check the version of WinRM on your computer.
  • Install the latest versions of Windows PowerShell and WinRM.
  • Verify that Windows PowerShell can run scripts.
  • Coffee

Links below will guide you along:

Once you have PowerShell up to date and working you should be good to go. Ok here we go…..

Live@EDU Outlook Live – Creating Users using PowerShell, PS1 script and a CSV file.

I stumbled across the blog of Jonny on http://liveatedu.spaces.live.com regarding creation of Live@EDU mailboxes.

The video is a helpful took I recommend watching before you proceed

PowerShell Video

PLEASE READ FIRST

From: http://help.outlook.com/en-us/140/cc952756.aspx – Also mentioned at the beginning of this article.

In PowerShell: Verify that Windows PowerShell can run scripts

Click Start > All Programs > Windows PowerShell V2.

Right-click Windows PowerShell V2 and select Run as administrator. If you get a user account control prompt that asks if you would like to continue, respond Continue.

Run the following command:

Get-ExecutionPolicy

If the value returned is anything other than RemoteSigned, you need to change the value to RemoteSigned.

Note. When you set the script execution policy to RemoteSigned, you can only run scripts that you create on your computer or scripts that are signed by a trusted source.

The only way so far I have managed to get ps1 scripts to run is using the following command:

Set-ExecutionPolicy Unrestricted

Now if ExecutionPolicy command is set to ‘Unrestricted’ it will run untrusted scripts.

I tried many times trying to sign my own ps1 files however it kept spitting out errors, so proceed only if you trust the script you are about to run.

3, 2, 1, 0 …….

Some prep work to utilise video: (Copy & Paste)

  • Create the folder ‘Tools’ in “C: Drive”.
  • Create the folder ‘Logging’ in “c:Tools”.
  • Download the CSV_Parser.ps1 file from here
  • Save it into “c:Tools”

Create the file NewMailbox.csv in notepad & paste the following example:

Action,Type,Name,EmailAddress,FirstName,LastName,DisplayName,Password,ForceChangePassword

Add,Mailbox,TestMbx8888,TestMbx8888@yourdomain.edu,Test,TestMbx8888,Test Mbx8888,1111111,0

Add,Mailbox,TestMbx8889,TestMbx8889@yourdomain.edu,Test,TestMbx8889,Test Mbx8889,1111111,0

Add,Mailbox,TestMbx8890,TestMbx8888@yourdomain.edu,Test,TestMbx8890,Test Mbx8890,1111111,0

Add,Mailbox,TestMbx8891,TestMbx8889@yourdomain.edu,Test,TestMbx8891,Test Mbx8891,1111111,0

Add,Mailbox,TestMbx8892,TestMbx8888@yourdomain.edu,Test,TestMbx8892,Test Mbx8892,1111111,0

  • Save it into ‘c:Tools”

Open up PowerShell ISE (CTP3) and use the following cmdlet’s:

$Livecred = get-credential

  • It will ask you to enter your Live@EDU account details.

c:ToolsCSV_Parser.ps1 -UsersFile c:ToolsNewMailbox.csv -LiveCredential $LiveCred -LogDirectory c:ToolsLogging -ValidateAction $true

That is it, check out your Outlook Live console for changes.

Live@EDU Outlook Live – Creating groups using PowerShell, PS1 script and a CSV file.

To create groups in your Live@EDU account is pretty easy once you know how, there are other methods but I have written what has worked for me.

PLEASE READ FIRST

From: http://help.outlook.com/en-us/140/cc952756.aspx – Also mentioned at the beginning of this article.

In PowerShell: Verify that Windows PowerShell can run scripts

Click Start > All Programs > Windows PowerShell V2.

Right-click Windows PowerShell V2 and select Run as administrator. If you get a user account control prompt that asks if you would like to continue, respond Continue.

Run the following command:

Get-ExecutionPolicy

If the value returned is anything other than RemoteSigned, you need to change the value to RemoteSigned.

Note When you set the script execution policy to RemoteSigned, you can only run scripts that you create on your computer or scripts that are signed by a trusted source.

The only way so far I have managed to get ps1 scripts to run is using the following command:

Set-ExecutionPolicy Unrestricted

Now if ExecutionPolicy command is set to ‘Unrestricted’ it will run untrusted scripts.

I tried many times trying to sign my own ps1 files however it kept spitting out errors, so proceed only if you trust the script you are about to run.

3, 2, 1, 0 …….

Ok a few things to get out of the way before we get to the script: (Copy & Paste)

# Have PowerShell ISE (CTP3) opened and run the following commands:

  • # Make sure ExecutionPolicy is to  ‘Unrestricted’

Set-ExecutionPolicy Unrestricted

  • # Log into Live Account

$livecred = Get-Credential

  • # The AllowRedirection parameter enables Outlook Live organizations all over the world to connect Windows PowerShell to Outlook Live by using the same URL.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

  • # A progress indicator appears that shows the importing of Outlook Live commands into the client-side session of your local computer. When this process is complete, you can run Outlook Live commands.

Import-PSSession $Session

If you have manage not to get any errors you may proceed; the ‘$Session’ variable is important for the script to work successfully.

The script. (Copy & Paste into PowerShell V2 script area of console)

##### START ######

# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK
# OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
#
# Synopsis: This script is designed to add Distribution Groups in Exchange Labs based on a CSV file containing data.
#
# Script Name: CreateGroups.PS1
#
# Author: Original snippets of code was downloaded from http://liveatedu.spaces.live.com/Blog/cns!C76EAE4D4A509FBD!884.entry – Jonny
#
# Edited by Phil Shapcott 17th June 2009
#
#
#    Usage example:
#
#    What the command will look like with information:
#    New-DistributionGroup -Name Computers -Alias Computers -DisplayName Computer Club -Type Security

# Create into an array ($Records) using import-csv tool. ‘-path’ is the path to your CSV file, we have our files in “C:Tools”.
$records = import-csv -Path c:Toolsgroups.csv -OutVariable string

# Defines your CSV files columns as a Variable, below is an example of the first line of information “Computers” in groups.csv file.
foreach ($group in $records)

{

$this_name                 = $group.name  # ‘Computers’

$this_alias                   = $group.alias  # ‘Computers’

$this_displayname       = $group.displayname # ‘Computer Club’

$this_type                   = $group.type   # ‘Security’ group
# Create distribution group – assigning result to variable to avoid listing the new object
%{Invoke-Command -Session $Session {param ($this_name,$this_alias,$this_displayname,$this_type) New-DistributionGroup -Name $this_name -Alias $this_alias -DisplayName $this_displayname -Type $this_type}-arg $this_name,$this_alias,$this_displayname,$this_type} > $results

}

##### END ######

The CSV file example – groups.csv

The CSV file is pretty simple as well just copy the text into a notepad file and save it as groups.csv.

Save all files in “c:Tools” folder you created earlier when creating mailboxes.

Name,Alias,DisplayName,Type

Computers,Computers,Computer Club,Security

English,English,English Faculty,Security

PRESS ‘PLAY’ (Run Script)

When you’re finihsed using the Outlook Live serve-side session, always disconnect windows PowerShell from Outlook Live.

For example, to disconnect f rom the server-side session that is defined by the $Session variable.

Remove-PSSession $Session

Credits

Jonny @ Live Spaces, Microsoft Help and Connect Site and Adam Bradley for phone support

Cheers,

Phil

  • Digg
  • Twitter
  • Facebook
  • del.icio.us
  • StumbleUpon
  • Technorati
  • LinkedIn
  • RSS
  • MySpace
  • Slashdot

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments

[...] Outlook Live – How to get started Live@EDU Outlook Live – How to get started Posted by EasyReadArticles.com in EasyReadArticles at 04:47 Karma for this [...]

[...] Outlook Live – How to get started Oringinal Article Live@EDU Outlook Live – How to get started Well I found snippets of cmdlet you can use in PowerShell however knowing how a lot of schools [...]

Also I recommend changing your ExecutionPolicy back to RemoteSigned.

Set-ExecutionPolicy RemoteSigned

Cheers,

phil

[...] on adding students to distribution list in live@edu. related: http://www.easyreadarticles.com/?p=203 [...]

[...] on adding students to distribution list in live@edu. related: http://www.easyreadarticles.com/?p=203 [...]

Also for your reference:

Using the command:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

I’m in Gold Coast Australia so the address:

https://ps.outlook.com/powershell/ will redirect to this address https://pod51003psh.outlook.com/PowerShell-LiveID/

So you could get away with putting:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://pod51003psh.outlook.com/PowerShell-LiveID/ -Credential $LiveCred -Authentication Basic

There are different addresses such as Oceanic, United States etc.

Cheers,

Phil – EasyReadArticles.com

Leave a comment

(required)

(required)