locked
How to OCS enable users from a spreadsheet RRS feed

  • Question

  • Hi, folks.  We're in need of finding a solution that will enable us to OCS enable a couple thousand people in an particuliar OU containing many thousands of people.  We have a list in Excel of the people to be enabled.  Is there an easy way to do this?
    AcroyearUSMC
    Thursday, September 3, 2009 6:41 PM

Answers

  • With PowerShell, you can easily use ocs-r2.ps1 from the OCS 2007 R2 RK to UC-enable existing users. Briefly, the steps are as follows, with the assumption all users are in the test OU and the R2 home server will be ocsr2home:

    1. In Excel, export or save the data as CSV e.g. users.csv
    2. start POSH and load ". .\ocs-r2.ps1" (without quotes)
    3. with POSH, run the following interactively or you can put them in a .ps1 file:
        $fqdn = "swissitpro.ch"
        $ou = "OU=test,DC=swissitpro,DC=ch"
        $r2home = "CN=LC Services,CN=Microsoft,CN=ocsr2home,CN=Pools,CN=RTC Services,CN=Services,CN=Configuration,DC=swissitpro,DC=ch"

        $users = Import-CSV users.csv
        $users | foreach-object {
            $first_name = $_.firstname
            $last_name = $_.lastname
            $userDN = "CN=" + $_.firstname + "," + $ou
            $uri = "sip:" + $_.firstname + "@" + $fqdn

            New-OCSUser -user  $userDN -homeServer $r2home -uri $uri
        }


    Do let us know if this helps. Thanks.


    TechNet Forum Moderator - http://www.leedesmond.com
    Friday, September 4, 2009 12:49 PM
    Moderator

All replies

  • Isn't exactly what you want but can help you.

    http://www.haverhoek.nl/index.php?/archives/23-Enable-existing-user-for-Communications-Server.html
    Bruno Estrozi - MCSE/MCTS/MCITP - Unified Communications Specialist | http://brunoestrozi.spaces.live.com
    Thursday, September 3, 2009 7:08 PM
  • Take a look at this article for some background on how to script the changes you need: http://blogs.pointbridge.com/Blogs/schertz_jeff/Pages/Post.aspx?_ID=29
    Jeff Schertz, PointBridge | MVP | MCITP: Enterprise Messaging | MCTS: OCS
    Thursday, September 3, 2009 10:30 PM
    Moderator
  • With PowerShell, you can easily use ocs-r2.ps1 from the OCS 2007 R2 RK to UC-enable existing users. Briefly, the steps are as follows, with the assumption all users are in the test OU and the R2 home server will be ocsr2home:

    1. In Excel, export or save the data as CSV e.g. users.csv
    2. start POSH and load ". .\ocs-r2.ps1" (without quotes)
    3. with POSH, run the following interactively or you can put them in a .ps1 file:
        $fqdn = "swissitpro.ch"
        $ou = "OU=test,DC=swissitpro,DC=ch"
        $r2home = "CN=LC Services,CN=Microsoft,CN=ocsr2home,CN=Pools,CN=RTC Services,CN=Services,CN=Configuration,DC=swissitpro,DC=ch"

        $users = Import-CSV users.csv
        $users | foreach-object {
            $first_name = $_.firstname
            $last_name = $_.lastname
            $userDN = "CN=" + $_.firstname + "," + $ou
            $uri = "sip:" + $_.firstname + "@" + $fqdn

            New-OCSUser -user  $userDN -homeServer $r2home -uri $uri
        }


    Do let us know if this helps. Thanks.


    TechNet Forum Moderator - http://www.leedesmond.com
    Friday, September 4, 2009 12:49 PM
    Moderator
  • hi
    Any update for your issue?

    Thanks!
    Regards!
    Friday, September 11, 2009 10:03 AM
    Moderator
  • With PowerShell, you can easily use ocs-r2.ps1 from the OCS 2007 R2 RK to UC-enable existing users. Briefly, the steps are as follows, with the assumption all users are in the test OU and the R2 home server will be ocsr2home:

    1. In Excel, export or save the data as CSV e.g. users.csv
    2. start POSH and load ". .\ocs-r2.ps1" (without quotes)
    3. with POSH, run the following interactively or you can put them in a .ps1 file:
        $fqdn = "swissitpro.ch"
        $ou = "OU=test,DC=swissitpro,DC=ch"
        $r2home = "CN=LC Services,CN=Microsoft,CN=ocsr2home,CN=Pools,CN=RTC Services,CN=Services,CN=Configuration,DC=swissitpro,DC=ch"

        $users = Import-CSV users.csv
        $users | foreach-object {
            $first_name = $_.firstname
            $last_name = $_.lastname
            $userDN = "CN=" + $_.firstname + "," + $ou
            $uri = "sip:" + $_.firstname + "@" + $fqdn

            New-OCSUser -user  $userDN -homeServer $r2home -uri $uri
        }


    Do let us know if this helps. Thanks.


    TechNet Forum Moderator - http://www.leedesmond.com

    Where you found the ocs-r2.ps1 script?

    Bruno Estrozi - MCSE +S +M/MCTS/MCITP - Unified Communications Specialist | http://brunoestrozi.com.br
    Friday, September 18, 2009 12:46 PM
  • osc-r2.ps1 is part of the CD from the MS Press book entitled Office Communications Server 2007 Resource Kit R2. Separately, the Office Communications Server 2007 R2 Resource Kit Tools are also available for download.

    Please share with us if this helps. Thanks.


    TechNet Forum Moderator - http://www.leedesmond.com
    Friday, September 18, 2009 6:32 PM
    Moderator