Home > Articles > Operating Systems, Server

  • Print
  • + Share This
This chapter is from the book

Administration

This section reviews common administration tasks for Lync Server. As mentioned previously, the focus is primarily on the use of the PowerShell-based Management Shell. The most common administrative function is enabling a user for Lync Server. For example, to enable the user Rand Morimoto with the SIP address of rand@companyabc.com, you use the following command:

Enable-csUser –Identity "Rand Morimoto" –RegistrarPool
"cspool.companyabc.com" –SIPAddress "sip:rand@companyabc.com"

This example explicitly specifies the SIP address to be used. Lync Server can also automatically generate the address using the SIPAddressType parameter based on a number of options including first.last name (firstLastName), email address (emailaddress), UPN (userPrincipalName), and SAM account name (SAMAccountName). This is helpful when enabling a large number of users and when specifying the actual SIP address isn't practical. To enable a user with a SIP address that is his email address, use the following cmdlet syntax:

Enable-csuser –Identity <user Identity> -RegistrarPool <front end
pool FQDN> -SIPAddressType EmailAddress

Obviously, enabling a user can also be done in the Lync Server Control Panel. However, it's often faster to simply use the management shell.

Let's look at a more traditional PowerShell concept applied to Lync Server: the Get-CsUser and Get-CsAdUser cmdlets. On the surface, you might think these cmdlets are almost identical; however, that is not the case. They are actually different. The biggest difference is that Get-CsUser returns results only for Lync Server–enabled users. So, if users are currently enabled or the Identity parameter is specified to be a nonenabled user, the cmdlet won't return any data. Get-CsAdUser returns data for both enabled and nonenabled users.

That leads to the question, "Why not use Get-CsAdUser all the time?" The answer is the cmdlets return different information when used appropriately. Table 5.2 displays the attributes returned by each. As you can see, Get-CsAdUser returns general Active Directory information, whereas Get-CsUser returns Lync Server-specific information. There is a small bit of overlap, but only where Lync Server references a generic Active Directory field.

Table 5.2. Information Returned by Get-CsUser and Get-CsAdUser Cmdlets

Get-CsUser

Get-CsAdUser

AddressListMembership

AltSecurityIdentities

ArchivingPolicy

Assistant

AudioVideoDisabled

City

ClientPolicy

ClientVersionPolicy

Company

ConferencingPolicy

CountryAbbreviation

CountryCode

CountryOrRegionDisplayName

CSEnabled

CSEnabled

Department

Description

DialPlan

DisplayName

DisplayName

DistinguishedName

EmployeeId

EnabledForRichPresence

EnterpriseVoiceEnabled

ExternalAccessPolicy

Fax

FirstName

Guid

HomePhone

HomeServer

HostedVoiceMail

HostedVoicemailPolicy

HostingProvider

Id

Identity

Identity

Info

Initials

IPPBXSoftPhoneRoutingEnabled

IPPhone

IsValid

LastName

LineServerURI

LineURI

LocationPolicy

Manager

MiddleName

MobilePhone

Name

ObjectCategory

ObjectCategoryCN

ObjectClass

ObjectState

Office

OriginatingServer

OriginatorSid

OtherFax

OtherHomePhone

OtherIPPhone

OtherMobile

OtherPager

OtherTelephone

Pager

PasswordLastSet

Phone

PinPolicy

PostalCode

PostOfficeBox

PreferredLanguage

PresencePolicy

PrimaryGroupId

PrivateLine

ProxyAddresses

RegistrarPool

RemoteCallControlTelephonyEnabled

SamAccountName

SamAccountName

Sid

SidHistory

SipAddress

SipAddress

StateOrProvince

Street

StreetAddress

TargetHomeServer

TargetRegistrarPool

TenantId

TenantId

Title

Url

UserAccountControl

UserPrincipalName

UserPrincipalName

VoicePolicy

WebPage

WhenChanged

WhenCreated

WindowsEmailAddress

There are many similar cmdlet relationships in the Management Shell. In fact, you can write a book to explain the various cmdlets, their syntaxes, and how to link them together to accomplish different tasks.

  • + Share This
  • 🔖 Save To Your Account