Management

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 773 other subscribers

Social

  • LinkedIn
  • RSS Feed for Posts
  • Twitter
  • StumbleUpon

Powershell script voor Bulk import van users voor server 2008 en Exchange 2007

Here you find the powershell script which were very useful for me.

All scripts are free of charge, use them at your own risk :


Met onderstaande script kun je gebruikers vanuit een csv bestand importeren.

Script :


Function secureit( $string )
{
$ss = New-object System.Security.SecureString
$string.GetEnumerator() | foreach-object { $ss.AppendChar( $_ ) }
$ss
}

import-csv D:ScriptsDownloadsNew-MailboxUser.csv | foreach-object {New-Mailbox -Name $_.Name -Alias $_.Alias -OrganizationalUnit $_.OrganizationalUnit -UserPrincipalName $_.UserPrincipalName -SamAccountName $_.SamAccountName -FirstName $_.FirstName -LastName $_.LastName -Password (secureit $_.Password) -ResetPasswordOnNextLogon $false -Database $_.Database}

import-csv D:ScriptsDownloadsNew-MailboxUser.csv | foreach-object {set-user -identity $_.UserPrincipalName -Title $_.Title}


Opbouw van het csv bestand:
FirstName,LastName,name,Alias,userPrincipalName,sAMAccountName,title,PassWord,Database,OrganizationalUnit

Voorbeeld van 1 gebruiker:
Richard,Voogt,Richard Voogt,RV,rvoogt@domein.nl,rvoogt,System Engineer,P@ssw0rd,XCH01First Storage GroupMailbox Database,sbsusers

Richard