Showing posts with label Power Shell. Show all posts
Showing posts with label Power Shell. Show all posts

Wednesday, September 12, 2012

Remove + from FromURI or RequestURI in Lync 2010

Some of the call manager will not suppot when lync initiate call with +symbol in both to and From URI's(E.164).In such cases You can remove the + from lync side while sending to the call manager or gateway.

ToURI + you can strip from the trunk configuration using GUI.Like below.

But to remove + from FromURi there is  no option available in GUI mode.Format will be something  like this.from<sip:+12345@.....>.In this case gateway or call manager may not acept such request.
This option you can change using powersehell script.Run the get-cstrunkconfiguration.You will get output like below.


Here in the image highlighted seeting we need to make it as true.So it will remove + before sending to Call manager or gateway.Command will be like this.Set-CStrunk configuration -identity "test" RemovePlusFromUri $true.Now the Header wil be like From<Sip:12345@.....>to<.....>


Wednesday, March 28, 2012

Lync 2010 Power Shell Commands

NameSynopsisHelpUri
Approve-CsDeviceUpdateRuleApproves a device update rule that has been imported to the system. After a device update rule has been approved, the corresponding update will automatically be downloaded and installed by client devices affected by the update.Link
Clear-CsDeviceUpdateFileDeletes any rejected device update files that are no longer associated with a device.Link
Clear-CsDeviceUpdateLogDeletes all the Device Update Web service log and audit files that are older than the specified number of days.Link
Debug-CsLisConfigurationDisplays the Enhanced 9-1-1 (E9-1-1) Location Information service (LIS) configuration in XML format.Link
Disable-CsAdDomainUndoes the domain preparation tasks carried out by the Enable-CsAdDomain cmdlet. This cmdlet is typically used only if you are uninstalling Microsoft Lync Server 2010 from a domain.Link
Disable-CsAdForestUndoes the forest preparation tasks carried out by the Enable-CsAdForest cmdlet. This cmdlet is typically used only if you are uninstalling Microsoft Lync Server 2010.Link
Disable-CsComputerDisables a service or server role that has been removed from a computer running Microsoft Lync Server 2010.Link
Disable-CsHostingProviderDisables a hosting provider currently in use in your organization. A hosting provider is a third-party organization that provides instant messaging, presence, and related services for a domain that you would like to federate with. Hosting providers, such as Microsoft Lync Online 2010, differ from public providers (such as Yahoo!, MSN, and AOL) in that their services are not offered to the general public.Link
Disable-CsPublicProviderDisables a public provider configured for use in your organization. A public provider is an organization that provides instant messaging, presence, and related services to the general public. Microsoft Lync Server 2010 ships with three public providers configured but not enabled: Yahoo!; AOL; and MSN.

Thursday, March 22, 2012

User count in Lync using Powershell

To get the number of users enable for lync run the below command

Get-CsUser -OnLyncServer | Measeure

OR

(Get-CsUser -OnLyncServer).count

To get the list of enterprise voice enabled users run below commands

get-csuser -Filter {EnterpriseVoiceEnabled -eq $true}

For count

get-csuser -Filter {EnterpriseVoiceEnabled -eq $true} | Measure

Wednesday, March 21, 2012

Limit number of Contacts user can have in Lync

If you want to set the number of contacts a user can have please go though below steps.

To check the current configuration run below commands.It will display the current limit

Get-CsUserServicesConfiguration

Result will be like

MaxContacts: 250

Set contacts limit in global lvele follow the below comands

Set-CsUserServicesConfiguration –Identity global –MaxContacts 750

To create new policy follow the below steps

New-CsUserServicesConfiguration –Identity site:Redmond –MaxContacts 400

To create pool level find below commands

New-CsUserServicesConfiguration –Identity service:UserServer:Servername –MaxContacts 100

 To find out number of contacts for a user use the Lync resource kit tool.There is no powershell script available.

Run below command from the command prompt wher the resource kit directory

DBAnalyze.exe /user:user@domain.com> c:\output.txt

Sunday, March 4, 2012

Export user details in Lync 2010 using Powershell

List of users

Get-CsUser | select-object SipAddress,LineUri,EnterpriseVoiceEnabled  ..etc


List all users who are Enterprise Voice Enabled, and have a Dial Plan of Calgary


Get-CsUser -Filter {EnterpriseVoiceEnabled -eq $True} | where {$_.DialPlan -match "Calgary"}


List all users with phone number where their AD telephone number contains xxx


Get-CsAduser -Filter {Phone -like "*xxxx"} | select-object DisplayName,Phone


Count Enterprise Voice Users with a Phone Number

(get-csuser -OnLyncServer -Filter {EnterpriseVoiceEnabled -eq $true} | Where-Object {$_.LineURI –match "tel:+"} ).count


Export a List of Enterprise Voice Users

get-csuser -Filter {EnterpriseVoiceEnabled -eq $true} | export-csv evenabled.csv