Tags

Howto (51) Free Software (35) Powershell (33) Windows Server (23) AD (16) Hyper-V (16) Exchange (13) Office (13) Group Policy (10) Windows Server 2012 (9) Scripts (7) Symantec BE (5) Windows 8 (5) Cisco (4) TMG (4) Terminal Server (4) Cluster (3) HP (3) RDS (3) UAG (3) Citrix (2) DC (2) DNS (2) IE10 (2) OpenID (2) PKI (2) SCVMM (2) Windows Live (2) iLO (2) Backup (1) DPM (1) Fileserver (1) IE (1) SQL; DPM (1) Security (1) Sharepoint (1) Switch (1) VMWare (1) Veeam (1)

donderdag 15 december 2011

Verplaats Mailbox van Exchange lokaal naar Office365

Verbinding maken met de Remote Powershell

Connect Windows PowerShell to the Cloud-based service

$LiveCred = Get-Credential

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

Import-PSSession $Session


Disconnect Windows PowerShell from the Cloud-based service

Als je klaar bent met de acties in de Remote Powershell kun je de sessie met het volgende commando beëindigen

Remove-PSSession $Session

Important If you close the Windows PowerShell window without disconnecting from the server-side session, your connection will remain open for 15 minutes. Your account can only have three connections to the server-side session at one time.


Plaats lokale credentials in een variabele

$RemoteCredential = Get-Credential

Verplaats de mailbox naar de cloud

New-MoveRequest -Identity "gebruiker@domein.nl" -Remote -RemoteHostName 'mail.domein.nl' -RemoteCredential $RemoteCredential -TargetDeliveryDomain 'service.domein.nl'

De status van de move actie kun je bekijken met:

Get-MoveRequest

Om meerdere mailboxen te verplaatsen kun je gebruik maken van onderstaand script:

Import-CSV movemb1.txt | ForEach {New-MoveRequest -Identity $_.UserPrincipalName -Remote -RemoteHostName 'mail.domein.nl' -RemoteCredential $RemoteCredential -TargetDeliveryDomain 'service.domein.nl'}

In het bestand movemb1.txt staan de identities. De eerste regel in het bestand is “UserPrincipalName”

ß snippet à

UserPrincipalName
gebruikera@domein.nl
gebruikerb@domein.nl
gebruikerc@domein.nl
gebruikerd@domein.nl
gebruikerd@domein.nl
etc..

ß snippet à

De status van de move actie kun je bekijken met:

Get-MoveRequest –MoveStatus InProgress

Om Requests te verwijderen kun je onderstaand gebruiken:

Remove-MoveRequest

Geen opmerkingen:

Een reactie posten