Import users and the Destination Server into the Dashboard for Windows SBS 2011 Essentials migration

Published: March 10, 2011

Updated: May 12, 2011

Applies To: Windows Small Business Server 2011 Essentials

After the replication has taken place, user names and the Destination Server will appear in Active Directory Users and Computers, but they will not appear in the Windows SBS 2011 Essentials Dashboard. You can use Windows PowerShell commands to import user names and the Destination Server into the Dashboard, or you can use a script to automate the import process.

To manually import users into the Dashboard

  1. On the Destination Server, open a Command Prompt window as an administrator. For more information, see To open a Command Prompt window as an Administrator.

  2. Change to the directory C:\Program Files\Windows Server\Bin.

  3. Type WssPowerShell.exe, and then press ENTER.

  4. Type Import-WssUser –Name <username>, and then press ENTER.

  5. Repeat the previous step for each user name that you want to import into the Dashboard.

To use a script to import users into the Dashboard

  1. On the Destination Server, open Notepad and copy the following script into it:

    "Script to Import Active Directory Users to the Windows SBS 2011 Essentials Dashboard"
    import-module -name activedirectory
    $users = get-aduser -filter *
    foreach ($user in $users)
    {
     If ($user.enabled -eq $True)
     {
    
        $pat =  ">"+$user.samaccountname+"<"
        write-host {Pattern::} $pat
    
        $imported = Select-String -path "C:\ProgramData\Microsoft\Windows Server\Data\settingsproviderdata\IDENTITY\USERS\index.xml" -pattern $pat
    
        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. Click File, and then click Save.

  3. Browse to any folder on your Destination Server, and type a file name with a .ps1 extension (for example, C:\importusers.ps1).

  4. In Save as type, choose All Files, and then click Save.

  5. Open a Command Prompt window as an administrator. For more information, see To open a Command Prompt window as an Administrator.

  6. Change to the directory C:\Program Files\Windows Server\Bin.

  7. Type WssPowerShell.exe, and then press ENTER.

  8. Type Set-ExecutionPolicy RemoteSigned, and then press ENTER.

  9. Type <path><filename> for the script file that you created (for example, C:\importusers.ps1), and then press ENTER.

  10. Type Set-ExecutionPolicy Restricted, and then press ENTER.

To import the Destination Server into the Dashboard

  1. Open a Command Prompt window as an administrator. For more information, see To open a Command Prompt window as an Administrator.

  2. Change to the directory C:\Program Files\Windows Server\Bin.

  3. Type WssPowerShell.exe, and then press ENTER.

  4. Type Add-WssLocalMachineCert, and then press ENTER.

  5. Restart the Destination Server.

Next topic: Join computers to the new Windows SBS 2011 Essentials network

Previous topic: Transfer the global catalog to the Destination Server for Windows SBS 2011 Essentials migration