locked
how to enable a user by command line tool? RRS feed

  • Question

  • Hello, now I enable a user by the wizard, but how to enable user by command line tool? I want to enable users in batch by a cmd file. thanks.
    Monday, July 27, 2009 6:19 AM

Answers

  • Hello, I have resolved it. hehe. it's should AD mannagement snap in.

    Add-PSSnapin Quest.ActiveRoles.ADManagement
    set-qaduser -identity "oceanstudio\test" -oa @{'msRTCSIP-UserEnabled'=$true;'msRTCSIP-PrimaryHomeServer'='CN=LC Services,CN=Microsoft,CN=ocspool,CN=Pools,CN=RTC Service,CN=Services,CN=Configuration,DC=oceanstudio,DC=net';'msRTCSIP-PrimaryUserAddress'='sip:test@oceanstudio.net';'msRTCSIP-OptionFlags'=256;'msRTCSIP-InternetAccessEnabled'=$true}

    itt's changed AD property directly.

    • Marked as answer by Haiyang Ju Tuesday, July 28, 2009 11:02 AM
    Tuesday, July 28, 2009 11:02 AM

All replies

  • I would suggest to use Powershell instead.

    Download the PowerGUI and install the OCS pack from the Resource kit. This ia ll you need.
    http://blog.insideocs.com/2008/08/25/ocs-2007-powergui-powerpack-updated/ 

    Cheers
    Werner
    Monday, July 27, 2009 9:37 AM
  • You can also download the OCS 2007 R2 resource kit
    http://www.microsoft.com/downloads/details.aspx?FamilyID=9e79a236-c0df-4a72-aba6-9a9602a93ed0&DisplayLang=en

    You will find some valuable scripts in there:

    • LCSEnableConfigureUsers.wsf - The Microsoft Office Communications Server 2007 Enable and Configure Users script, LCSEnableConfigureUsers.wsf, is a WMI (Windows Management Instrumentation) script used to enable and configure Office Communications Server users.
    • OcsAssignTelUri.wsf - The Microsoft Office Communications Server 2007 Assign Telephone URI scriptis a WMI (Microsoft Windows Management Instrumentation) script used to assign telephone URIs, from a list of available phone numbers, to Office Communications Server users. This script should be used to assign telephone URIs to users that have already been enabled for Office Communications Server and are configured for Enterprise Voice.
    • OcsConfigureTelUri.wsf - Configure Telephone URI script is a WMI (Microsoft Windows Management Instrumentation) script used to configure telephone URIs for Office Communications Server users, using an existing Active Directory user phone attribute and regular expression patterns for matching and translation. This script should be used to assign telephone URIs for users that have already been enabled for Office Communications Server and are configured for Enterprise Voice.

    - Belgian Unified Communications Community : http://www.pro-exchange.be -
    Monday, July 27, 2009 11:23 AM
  • If you want to do it in bulk, take a look at this blog article: http://blogs.pointbridge.com/Blogs/schertz_jeff/Pages/Post.aspx?_ID=29

    I cover the process and require msRTCSIP attributes needed to get accounts SIP-enabled and functional for OCS.
    Jeff Schertz, PointBridge | MVP | MCITP: Enterprise Messaging | MCTS: OCS
    Monday, July 27, 2009 12:43 PM
    Moderator
  • Hello Deli,
            I'm very interested in powershell solution, but follow your suggestion, I installed powerGUI and ocs pack. but I didn't find how to use the command. I try to run the "set-qaduser" cmdlet in powershell, it prompt me it's not a valid cmdlet.
           how to use it? thanks.
    Tuesday, July 28, 2009 10:03 AM
  • Hello, I have resolved it. hehe. it's should AD mannagement snap in.

    Add-PSSnapin Quest.ActiveRoles.ADManagement
    set-qaduser -identity "oceanstudio\test" -oa @{'msRTCSIP-UserEnabled'=$true;'msRTCSIP-PrimaryHomeServer'='CN=LC Services,CN=Microsoft,CN=ocspool,CN=Pools,CN=RTC Service,CN=Services,CN=Configuration,DC=oceanstudio,DC=net';'msRTCSIP-PrimaryUserAddress'='sip:test@oceanstudio.net';'msRTCSIP-OptionFlags'=256;'msRTCSIP-InternetAccessEnabled'=$true}

    itt's changed AD property directly.

    • Marked as answer by Haiyang Ju Tuesday, July 28, 2009 11:02 AM
    Tuesday, July 28, 2009 11:02 AM