Get-Scripting

Background

If you ever wanted to present PowerPoint in Lync, then chances are, you know its possible. How about presenting Video into the Lync Online Meeting or Lync call? Well this is not possible, oops, You can play the video and share your screen or Media Player application. The remote party will get the video. So its actually possible but the remote party or meeting participants get lousy video quality that constantly peels every second. The quality of the picture is not that great. However after investing sometime into this topic, I figured a way to make this possible. If you are looking a commercial solution and have a budget for it then the following solutions are worth considering.

Sometimes there are conspiracies hatched by technology in an effort to make life difficult for custodians. The good thing about this custodians gets to learn a few more tricks if they invest some time in understanding these conspiracies. Recently, a data centre switched malfunctioned and caused a network outage. The outage broke a few things and corrupted one of my Lync 2010 address book files. My lync users started getting weird and garbled contacts when searching on Lync. No matter what i did, the garbled contacts stayed. I turned to my event log on my front end pool for the affected users.

Lync mobility mobility policy provides you with a way to control lync on mobile devices. I have had Lync mobility working for a while now and my users have been very happy. Except when one group is happy, there is a another group which is unhappy. What could possibly make someone unhappy with Lync mobile? Well several things actually...

Subcategories

This script upload photos from folder in c drive. The name of the photo should be the samaccountname of the user and the photo must be in jpeg format. The photo size must be 76x 124"

param([Switch]$all, [String]$UserName)
#Default Values. Change them based on your environment.
$DefaultPhotoPath = 'C:\Photos'
Function CheckPhoto(){
Write-Warning "Validating file(s).." 
Write-Host "File exists... " -nonewline
 If (Test-Path $PhotoPath) 
 {
  Write-Host "[OK]" -ForeGroundColor Green
  Write-host "Photo size... " -nonewline
  $PhotoSize = Get-ChildItem $PhotoPath | select Length
  If ($PhotoSize.Length -le 10000) {
   Write-Host "[OK]" -ForeGroundColor Green
  }
  Else
  {
   Write-Host "[Fail]" -ForeGroundColor Red;
   exit
  }
 }
  Else
 {
  Write-Host "[Fail]" -ForeGroundColor Red Exit
 }

Function UploadAll()
{
ForEach ($TempFile in Get-ChildItem $DefaultPhotoPath | Where-Object { $_.Extension -eq ".jpg" } )
 { 
  $TempUserName = $TempFile.Name.substring(0, $TempFile.Name.Length - 4) 
  Write-Host $TempUserName -ForeGroundColor Yellow -NoNewLine 
  Import-RecipientDataProperty -Identity $TempUserName -Picture -FileData ([Byte[]]$(Get-Content -path $TempFile.Fullname -Encoding Byte -ReadCount 0)) 
  Write-Host "[Done]" -ForeGroundColor Green
         }
 }
If ( $all -eq $true) 

 Write-Warning " ## This action will upload all pictures of C:\Photos to the AD users."
Write-Warning " ## All pictures must have the same name of the usernames" 
Write-Warning "Are you sure that you want upload all pictures to the users (Y/N)?" 
$Opt = Read-Host  If ( $Opt -eq 'y' )
{ UploadAll; }
Else
{ Write-Host "No changes were made.";
Exit }
}
Else
{
$PhotoPath = $DefaultPhotoPaty + $UserName + '.jpg'
CheckPhoto;
If ( $AbortMission -eq '$true' )
{
Write-Error "Please, review the errors and try again." }
Else
{
Import-RecipientDataProperty -Identity $UserName -Picture -FileData ([Byte[]]$(Get-Content -path $PhotoPath -Encoding Byte -ReadCount 0))

}

Who has been here?