Friday, 10 June 2011

Lync 2010 - Announcement Service


View Current Announcements
get-CsAnnouncement


Remove Announcement
remove-CsAnnouncement

EG
remove-CsAnnouncement -Identity: ApplicationServer:Lync2010.company.com/b5c9c298-ad14-4b28-a6
87-fc2b811cf262

Find Identity using get-CsAnnouncement command


Create New Announcment
new-CsAnnouncement

EG's

New-CsAnnouncement -Parent service:ApplicationServer:lync2010.company.com -Name "Main Number" (RGS_MainNumber@company.com)" -TargetUri sip:RGS_MainNumber@company.com




For more information on these commands use the -? command.

EG - new-CsAnnouncement -?

Lync 2010 - Manually Updating the address book

Run the follwing command in the Lync Power Shell:


Update-CsAddressBook

Lync 2010 - Error when changing Lync users settings


When you try and change a users settings you get "Active Directory Operation Failed on..." "You do not have the appropriate permissions to perform this operation..."







This happens because the user is a member of a Windows Builtin group, such as Domain Admins.  When a user is a member of one of the special Windows built-in groups, Windows will automatically remove security inheritance on that user.

To fix this you must reapply inheritance.
Open Active Directory Users and Computers and locate the user object
Right-click the user and select Properties
Click the Security tab and then the Advanced button
Check the Include inheritable permissions from this object's parent check box
Click OK twice. Now try again.

Be aware that Windows will automatically remove the inheritance setting again within a few minutes as long as the user remains a member of the Windows built-in group.

Exch 2010 - Change Auto Discovery URL's



Change Web Services Location – Availability Service and Out of Office (OOF)


Get-webservicesvirtualdirectory | fl identity,internalurl,externalurl

Set-WebServicesVirtualDirectory -Identity "MachineName\EWS (Default Web Site)" -ExternalURL https:// autodiscover.company.com/EWS/Exchange.asmx -BasicAuthentication:$true

Change AutoDiscover Location

get-clientaccessserver | fl

get-clientaccessserver | set-ClientAccessServer –AutoDiscoverServiceInternalUri https://autodiscover.company.com/Autodiscover/Autodiscover.xml

Change AutoDiscover Internal and External URL’s

get-autodiscovervirtualdirectory | fl

Get-AutodiscoverVirtualDirectory | Set-AutodiscoverVirtualDirectory -InternalUrl "http://autodiscover.company.com"

Get-AutodiscoverVirtualDirectory | Set-AutodiscoverVirtualDirectory -ExternalUrl "http://autodiscover.company.com"

EXCH 2010 - Adding Thumbnail Pictures



The following command imports a picture to the thumbnailphoto attribute in AD. This can be used by Outlook, Lync, SharePoint and other application to display a users picture.

Import-RecipientDataProperty -Identity "mailbox name" -Picture -FileData ([Byte[]]$(Get-Content -Path "D:\Pictures\bob.jpg" -Encoding Byte -ReadCount 0))

Thumbnail image must be less than 10k.

Exch 2010 - Manual Offline Address Book Update


POWER SHELL

Update-OfflineAddressbook “Default Offline Address List”
Update-FileDistributionService

CONSOLE

Go to the Exchange management console, under "Organization Configuration" select the "Mailbox" container, go to the "Offline Address Book" container and right-click update on the address book you want to generate.

You can monitor the status of the generation of the OAB by looking at the time stamps of the files in <Exchange install directory>\V14\ExchangeOAB\<GUID of the Address Book>

Once the address book has been generated, you can speed up its distribution by forcing an update of the distribution file service, using  Update-FileDistributionService.