Hosted Exchange 2010 SP1

Håller just nu på att installera en Hosted Exchange 2010 lösning hos en kund och tänkte att jag skulle samla lite resurser och skriva ner lite instruktioner:

Powershell Snippets

Skapa en organisation

   1: Password = Read-Host "Enter Password" -AsSecureString

   2: New-organization -name TestOrg -DomainName TestOrg.com -ProgramId HostingSample -OfferId 2 -location sv-SE -AdministratorPassword $Password

Radera alla mailboxar i en organisation

   1: get-mailbox -Organization TestOrg | remove-mailbox

Radera Organisation

   1: Remove-Organization TestOrg

Skapa användare i Organisation

   1: $OrgName = TestORG

   2: Import-CSV CreateRecipients.csv | foreach {new-mailbox $_.name -userPrincipalName $_.UPN -org $OrgName -Password (ConvertTo-SecureString $_.password -AsPlainText -Force)}

Vi läser filen CreateRecipients.csv och skapar användare i Organisationen. CreateRecipients.csv skall se ut så här:

   1: Name,UPN,Password

   2: Nisse Hult,nisse.hult@testorg.com,P@ssw0rd1

   3: Kalle Kula,kalle.kula@testorg.com,P@ssw0rd2

Lägg till mailadresser för en användare

   1: $user = Get-Mailbox -identity $args[0] -organization TestOrg

   2: $CLIARGS=$args[1..($args.length - 1)]

   3: ForEach ($CLIARG in $CLIARGS)

   4: {

   5: $user.emailAddresses+=$CLIARG

   6: }

   7: Set-Mailbox $user -emailAddresses $user.emailAddresses

Detta script lägger till extra mailadresser för en användare. Spara scriptet som AddEmail.ps1 och kör det enligt följande:

AddEmail.ps1 [primary email] [extra email 1] [extra email 2]…

Länkar:

http://www.zerohoursleep.com/2010/10/step-by-step-starting-with-exchange-2010-sp1-multi-tenant-installation/
http://www.zerohoursleep.com/2010/10/step-by-step-starting-with-exchange-2010-sp1-multi-tenant-create-and-delete-organizations/
http://www.zerohoursleep.com/2010/10/step-by-step-starting-with-exchange-2010-sp1-multi-tenant-manage-your-organizations/
http://www.zerohoursleep.com/2010/10/step-by-step-starting-with-exchange-2010-sp1-multi-tenant-sending-and-receiving-emails/
http://www.yusufozturk.info/exchange-server/creating-a-new-mailbox-with-powershell-function-on-exchange-server-2010.html
http://www.yusufozturk.info/exchange-server/creating-a-new-mailbox-with-powershell-function-on-exchange-server-2010.html

Comments

Leave a Reply

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)