Wednesday 4 February 2015

How to check when the certificate gets expired on Lync Server

You can use the Lync Management Shell to check the certificate expiry status

Open Lync Management Shell

Run the below command

Get-CsCertificate | ft Issuer, Use, Subject, NotAfter

or

Get-CsCertificate | Out-GridView

Monday 2 February 2015

How to connect to Lync Server remotely from Windows PowerShell

Open a Notepad and save the below script and save the file as .PS1

************************************************************************************
# get creds for remote environment
$credential = get-credential "Domain\SamAccountName"
# set session options to bypass the PKI checks - I trust the far side
$sessionoption = New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
#create new session
$session = New-PSSession -ConnectionUri https://Server.domain.com/ocspowershell -Credential  $credential -SessionOption $sessionOption

# assuming the above line worked, import the cmdlets needed for Lync
import-pssession $session | FT -wrap

**************************************************************************************

Note: If you are trying to connect to Lync Server 2013 server, then ensure your Windows PowerShell is having 3.0 version