Since I’ve been blogging on migrating from SBS 2003 to SBS essentials a new version of the document came out.
This one includes a script to add users to the console
To use a script to import users into the Dashboard |
1. On the Destination Server, open Notepad and copy the following text into it: “Script to Import Active Directory Users to the SBS 2011 Essentials Dashboard” import-module -name activedirectory $users = get-aduser -filter * foreach ($user in $users) { If ($user.enabled -eq $True) { $imported = Select-String -path “C:\ProgramData\Microsoft\Windows Server\Data \settingsproviderdata\IDENTITY\USERS\index.xml” -pattern $user.samaccountname
If ([boolean]$imported -eq $False) { $import = read-host “Do you want to import” $user.name “to the Dashboard [y]/[n]”
If ($import -eq “y”) { write-host {Importing User} $user.name import-wssuser -name $user.samaccountname | out-null If( (get-wssuser -name $user.samaccountname).UserStatus -eq “Enabled”) { write-host User Successfully Imported } } } } }
2. Save the file on the Destination Server in any folder with a name you choose (for example, C:\importusers.ps). 3. Open a Command Prompt window as an administrator. For more information, see To open a Command Prompt window as an Administrator. 4. Change directory to c:\program files\windows server\bin. 5. Type wsspowershell.exe, and then press ENTER. 6. Type <path><filename> for the script file you created (for example, C:\importusers.ps), and then press ENTER. |