Showing posts with label Lync Room System. Show all posts
Showing posts with label Lync Room System. Show all posts

Friday, February 20, 2015

Bulk Import Custom Contact Groups into Lync User accounts

Was looking for a way to Populate our Lync Room systems into end users Lync Contacts as a group rather than a bunch of individual accounts.  (More on Lync Room Systems here http://bit.ly/netadmlr)

Based on the PowerShell script found below, a new section was created for the Contact Groups.
http://rp-it.blogspot.ca/2014/02/automatically-populate-contacts-for-all-lync-2013-users.html

Rather than repost the entire code, here's the updated sections...
For each Lync group that you want to create I would suggest creating new scripts.

For Individual account testing...

#Old version Enable for All users Disable for individual testing
$AllSipAddresses = Get-CsUser -Filter {Enabled -eq $True} | Select SipAddress | %{$_.SipAddress.Replace('sip:','')}

#GM Added - Enable for individual testing
#$AllSipAddresses = Get-CsUser -Identity lastname.first@domain.com -Filter {Enabled -eq $True} | Select SipAddress | %{$_.SipAddress.Replace('sip:','')}


# Common Contacts - Enable and populate this variable with a set of Lync contacts to distribute to all users instead of distributing all users to all users. Overrides $DontAddUsers.
#$CommonContacts = "lrs1@domain.com","lrs2@domain.com"

To add /verify the Group exists.
$AllContacts = @($SipAddressesToAdd | ?{$_ -ne $User})
    [xml]$XMLFile = Get-Content "$WorkingFolder\DocItemSet.xml"
    $XMLPart = $XMLFile.DocItemSet.DocItem | ?{$_.Name -like "urn:lcd:*"}
    $XMLNode = $XMLPart.Data.HomedResource.Contacts
$XMLNodeGroup = $XMLPart.Data.HomedResource.ContactGroups #GM
    $ExistingContacts = @($XMLNode.Contact | Select -ExpandProperty Buddy)
$ExistingContactGroups = @($XMLNodeGroup.ContactGroup | Select -ExpandProperty DisplayName) #GM
#GM Lync Rooms Contact Group Add
If($ExistingContactGroups){
If($ExistingContactGroups -eq "THluYyBSb29tcw=="){
write-host "`r`nLync Room Group Exists. Nothing changed.`r`n"
}
Else{
write-host "`r`nLync Room Group will be added.`r`n"
[System.XML.XMLLinkedNode]$NewContactGroup = $XMLFile.CreateElement('ContactGroup','http://schemas.microsoft.com/RtcServer/2002/11/dbimpexp')
            $NewContactGroup.SetAttribute('Number','20') #High number so as to not overwrite existing groups.
            $NewContactGroup.SetAttribute('DisplayName','CodeFromXML')
            #Display name in ContactGroups found in XMl file in test account
            #Export-CsUserData -PoolFqdn "lyncserver.domain.com" -UserFilter name@domain.com -FileName "c:\scripts\test.zip"
            $XMLNodeGroup.AppendChild($NewContactGroup)
        }
}
Else{
write-host "`r`nNo existing contact groups found.`r`n"
write-host "`r`nAdding New Contact Group XML Element.`r`n"
[System.XML.XMLLinkedNode]$NewNodeGroup = $XMLFile.CreateElement('ContactGroups','http://schemas.microsoft.com/RtcServer/2002/11/dbimpexp')
            [System.XML.XMLLinkedNode]$NewContactGroup = $XMLFile.CreateElement('ContactGroup','http://schemas.microsoft.com/RtcServer/2002/11/dbimpexp')
            $NewContactGroup.SetAttribute('Number','20') #High number so as to not overwrite existing groups.
            $NewContactGroup.SetAttribute('DisplayName','CodeFromXML')
            $NewNodeGroup.AppendChild($NewContactGroup)
            $XMLCGroup = $XMLPart.Data.HomedResource.Containers
            $XMLPart.Data.HomedResource.InsertBefore($NewNodeGroup,$XMLCGroup)
            $XMLFile.Save("$WorkingFolder\DocItemSet.xml")
            [xml]$XMLFile = Get-Content "$WorkingFolder\DocItemSet.xml"
            $XMLPart = $XMLFile.DocItemSet.DocItem | ?{$_.Name -like "urn:lcd:*"}
            $XMLNode = $XMLPart.Data.HomedResource.Contacts
}
#Back to original code
    Write-Host "`r`nExisting contacts:`r`n" 

Change these lines to include 1 and the group number in the $ContactstoAdd | foreach{} section
$NewContact.SetAttribute('Groups','1 20') 

If you have a large organization, you will need to create a new policy or edit the Global Presence policy.  Once all the Lync users had the Lync Rooms in the list, the "Maximum Followers Reached" error showed up on the Lync Room systems.

A new Presence Policy was created and applied to the Lync Room accounts. The MaxCategorySubcriptions was to 3000 and the error went away.

 Since it was only applied to the Lync Room systems it should not drastically increase the server traffic as compared to applying to all our Lync users.

Thursday, May 1, 2014

Custom Lync Room System Startup

Keep update on this project by following this link... http://bit.ly/netadmlr


To create the Domain joined custom Lync Room System...
  1. Group Policy to change these Registry Entries using Preferences
    1. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon (Applied to Computer Settings)
      1. DefaultUserName - LyncRoomAccount
      2. DefaultPassword - LyncRoomAccount Password
      3. DefaultDomainName - Domain.ca
      4. AutoLogonCount - Deleted
      5. AutoLogonChecked - Deleted
    2. HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell to wscript.exe //NoLogo /I "C:\Program Files\Lync Room System\Lync Room Computer Startup.vbs"  (Applied to Lync Room User Account Preferences)
    3. By using Preferences you can apply the settings based on Computer Name or Account name.  This allows the computer to still be used as a regular Windows system when logged off.
  2. Lync Room Computer Startup.vbs 
    1. Uses these Sysinternals programs BGInfo, PSKill
      1. Copy the BGinfo program over to "Program Files\Background"
      2. Edit LRS.bgi to change the desktop text and jpg images.
    2. Starts Rainmeter program with "Lync Room System" skin
      1. Once you install the program and installed Lync Room Skin, you must copy the "Lync Room System" folder from your documents\Rainmeter folder to the "Lync Room System" folder.
    3. Runs Office 2013 Lync
The Source files can be found here.  Copy them over to "C:\Program Files\Lync Room System" once the programs have been installed.  Includes a MS Word document with Group Policy information for creating your own GPO.

Monday, April 28, 2014

Rainmeter Custom Desktop Skin

Keep update on this project by following this link... http://bit.ly/netadmlr


April 30, 2014
Changed from Images to Buttons (Changes Icon based on mouse action - hover/click)
 - Includes Paint.Net PDN files for you to change
Battery Skin
 - Changed "Charging" to "AC Power"

Future versions will include the option to disable Right mouse button by adding
RightMouseUpAction=[] at the top of each skin in the [Rainmeter] section.

April 29, 2014

Shutdown/Restart/Log Off Bug - You will have to change the Logoff.cmd and Restart.cmd commands to say shutdown.exe other wise it will run the shutdown.cmd file before the shutdown.exe file. 

April 28, 2014
Uploaded the Rainmeter skin for the Custom Lync Room system to DeviantArt

Requires Rainmeter 3.1 - http://rainmeter.net/

Latest version of the Lync Room System Rainmeter Skin
http://gmpentaxfan.deviantart.com/art/Lync-Room-System-Custom-Desktop-Rainmeter-Skin-450762970

This allows for desktop icons, date, time, battery level, speaker levels and custom application launching without "explorer.exe" running.

Added the Rainmeter.exe with custom rainmeter.ini to load this skin via the computer startup script.

See previous article... http://gmnetadmin.blogspot.ca/2014/04/custom-lync-room-system.html

Tuesday, April 15, 2014

Custom Lync Room System

Keep update on this project by following this link... http://bit.ly/netadmlr

This past month (April 2014) has been spent working on a custom Lync Room System solution that doesn't involve purchasing a Lync Room System.

Followed the Lync Room System deployment guide for the LRS account setup, but instead of the LRS special software/hardware...
It uses the Lync 2013 client and can be deployed to any Windows 7 computer.

Update - April 30, 2014 - Now using Rainmeter software to add Desktop icons, clock, volume control and battery level. http://gmnetadmin.blogspot.com/2014/04/rainmeter-custom-desktop-skin.html

Setting up the computer to Autologin with LRS account.


Custom Lync Room Startup Video

Detailed Setup for the Custom Lync Room System

Resource Links
Lync LRS Deployment guide - http://www.microsoft.com/en-us/download/details.aspx?id=39274

Automatic Login Windows 7 - http://superuser.com/questions/28647/how-do-i-enable-automatic-logon-in-windows-7-when-im-on-a-domain

Sysinternals - BGInfo program for custom wallpaper background - http://technet.microsoft.com/en-us/sysinternals/bb897557

Sysinternals - Suite - Used PSkill and PSExec programs - http://technet.microsoft.com/en-us/sysinternals/bb842062

Encode a Script - http://gallery.technet.microsoft.com/scriptcenter/16439c02-3296-4ec8-9134-6eb6fb599880/view/Reviews

Lync Custom Commands - http://msdn.microsoft.com/en-us/library/office/jj945535(v=office.15).aspx