December 31 2010

Adding photos in Lync 2010

There are a number of ways for users to have photos in Lync 2010 but my preference is to store them in Active Directory because they can then be reused by Sharepoint, Exchange / Outlook and other applications.

This is a quick post about the easiest and cheapest way I have found to do this. I’m assuming that you already have your user photos.

Firstly, obtain and install Picture Resizer from here. I used the following options “-o -f96x96 -q100”. This meant that I can easily right-click on a user photo and have it resized to 96 x 96 while maintaining photo quality. This still results in image size reduction, which we are aiming to have well under 30KB to avoid bloating the AD database.

Right-click resize to 96 x 96
Right-click resize to 96 x 96

Next, install a piece of software by a guy named OliD that extends the Active Directory Users and Computers MMC with two tabs on the user properties page – from here. Read the installation instructions can be found in the .zip file.

Once installed you will have a Photo tab in ADUC. Select your newly resized photos and add them to to the thumbnail section.

Photo tab
Photo tab

More useful info here and here.

December 30 2010

Scheduled task Powershell script to backup Lync Server 2010 config

I’ve created a simple Powershell script to run daily to backup Lync configuration with the export-csconfiguration command:

cd $env:UserProfile
Import-Module 'C:Program FilesCommon FilesMicrosoft Lync Server 2010ModulesLyncLync.psd1'
$filename = "d:backup{}" -f (Get-Date)
export-csconfiguration -Filename $filename -Force:$True

For example, put the above code into a document called d:backupbackup.ps1 and then create a scheduled task to execute the command on a daily basis:

powershell -command d:Backupbackup.ps1

This can run in the SYSTEM context. Simples!

December 21 2010

SCCM report of all machines of a certain model

I needed to report all machines of a particular hardware model type. This report lists all machines of a particular hardware model (user is prompted to enter model name and is populated by a list of models found in the environment).

SQL statement:
SYS.Model0 = @variable

Prompt SQL statement:
if (@__filterwildcard = '')
Select DISTINCT SYS.Model0 from v_HS_COMPUTER_SYSTEM as SYS Order by SYS.Model0
WHERE SYS.Model0 like @__filterwildcard
Order by SYS.Model0


December 18 2010

SCCM report to show disk space for all servers

I needed an SCCM report to show the disk space details (total space, free space) for all servers in the environment. I had a look at this post – – updated the query and this is the result:

SELECT SYS.Name,LDISK.DeviceID0, LDISK.Description0, LDISK.VolumeName0,
LDISK.FreeSpace0 as [Free space (MB)],
LDISK.FreeSpace0/1024 as [Free space (GB)],
LDISK.Size0/1024 as [Total space (GB)],
LDISK.FreeSpace0*100/LDISK.Size0 as C074
FROM v_FullCollectionMembership SYS
join v_GS_LOGICAL_DISK LDISK on SYS.ResourceID = LDISK.ResourceID
JOIN v_R_System RSYS ON SYS.ResourceID = RSYS.ResourceID
LDISK.DriveType0 =3 AND
LDISK.Size0 > 0
AND SYS.CollectionID = 'SMS000DS'


December 16 2010

SCCM report to count hardware models

I needed an SCCM report to count how many of each type of hardware model we had in the environment. I created a new report with the following query:

GSCS.Manufacturer0 as [Manufacturer],
GSCS.Model0 as [Model],
count(*) as [Count]
from v_R_System RS
left join v_GS_COMPUTER_SYSTEM GSCS on RS.ResourceID = GSCS.ResourceID
Group by GSCS.Model0, GSCS.Manufacturer0
Order by GSCS.Model0