Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

powershell command for ms communicator 2007

132 views
Skip to first unread message

VinayKV

unread,
Jun 17, 2010, 11:47:49 AM6/17/10
to
Is there any command to enable microsoft office communicator 2007 for a user?

ekrengel

unread,
Jun 23, 2010, 9:56:57 AM6/23/10
to
On Jun 17, 11:47 am, VinayKV <Vina...@discussions.microsoft.com>
wrote:

> Is there any command to enable microsoft office communicator 2007 for a user?

I don't know of any "one" command, but you can script it. Something
like this should work...not tested, and you would have to input your
appropriate settings (IE your domain/user/OCS ADS):

# Bind to the user Object
$objUser = [ADSI]"LDAP://CN=John Doe,OU=TestOUUsers,OU=domain,DC=com"

# Set Variables
# 256 = EnabledForEnhancedPresence
$strPrimaryHomeServer = "CN=LC
Services,CN=Microsoft,CN=ocs,CN=Pools,CN=RTC
Service,CN=Services,CN=Configuration,DC=domain,DC=com"
$strPrimaryUserAddress = ("sip:" + $objUser.mail)
$bInternetAccessEnabled = False
$nOptionFlags = 256

# Set General Tab Properties
$objUser.Put("msRTCSIP-PrimaryUserAddress", $strPrimaryUserAddress)
$objUser.Put("msRTCSIP-InternetAccessEnabled",
$bInternetAccessEnabled)
$objUser.Put("msRTCSIP-OptionFlags", $nOptionFlags)
$objUser.Put("msRTCSIP-PrimaryHomeServer", $strPrimaryHomeServer)
$objUser.Put("msRTCSIP-UserEnabled", True)

# Commit changes
$objUser.setInfo()

ekrengel

unread,
Jun 23, 2010, 10:11:31 AM6/23/10
to

And if you wanted to have an input for a user instead of modifying
settings every time, you could do this:

# Input for username to search
$User = Read-Host “Enter the Users’ Logon Name to enable for OCS”

# Search for the username
$Search = New-Object DirectoryServices.DirectorySearcher([ADSI]“”)
$Search.filter = “(&(objectClass=user)(sAMAccountName=$User))”
$results = $Search.Findall()

Foreach($result in $results){
$objUser = $result.GetDirectoryEntry()

# Set Variables
# 256 = EnabledForEnhancedPresence
$strPrimaryHomeServer = "CN=LC
Services,CN=Microsoft,CN=ocs,CN=Pools,CN=RTC
Service,CN=Services,CN=Configuration,DC=domain,DC=com"
$strPrimaryUserAddress = ("sip:" + $objUser.mail)
$bInternetAccessEnabled = False
$nOptionFlags = 256

# Set and enable OCS settings

0 new messages