17 April 2014

Install Exchange 2010 Prerequisites on Windows 7 with Powershell (CMD)

Scripting your IIS and .NET 3.5 prerequisites for Exchange 2010 on Windows 7:

IIS:

dism /online /enable-feature /featurename:IIS-WebServerRole  /featurename:IIS-WebServerManagementTools /featurename:IIS-IIS6ManagementCompatibility /featurename:IIS-Metabase /featurename:IIS-LegacySnapIn

.NET 3.5:
Write-Host "Installing .Net Framework 3.5, do not close this prompt..." 
                    DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:$LocalSource | Out-Null  
                    $Result = Dism /online /Get-featureinfo /featurename:NetFx3 
                    If($Result -contains "State : Enabled") 
                    { 
                        Write-Host "Install .Net Framework 3.5 successfully." 
                    } 
                    Else 
                    { 
                        Write-Host "Failed to install Install .Net Framework 3.5,please make sure the local source is correct." 
                    }
In case the above doesn't work, you can try:
DISM /Online /Enable-Feature /FeatureName:NetFx3

Source

02 April 2014

Lync 2010 - Revoke a User Certificate

Lync 2010 - Revoke a User Certificate


This one is more important than you may think. If you disable an AD account, and permit users to save their username/password, they will still be able to use Lync! A lot of people don't know this and it creates an interesting discussion with the security officer.

Revoke-CsClientCertificate "Username"

Source

Convert Legacy mailbox to User mailbox

If you happen to have a Legacy Mailbox on an Exchange 2010 server, you can upgrade or convert it to a User Mailbox by using the shell command:

Set-Mailbox -identity Alias -ApplyMandatoryProperties


After executing the command, the mailbox should be converted from Legacy to user in about 20 seconds.

How to find the version of your Lync Server 2010

Check this once in a while to see if you're missing Lync 2010 "CU" updates.

Get-WmiObject -query 'select * from win32_product' | where {$_.name -like "Microsoft Lync Server*"} | foreach {$_}

Or:



Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |  ?{$_.DisplayName -like “*Lync Server*”} | Sort-Object DisplayName | Select DisplayName, DisplayVersion, InstallDate | Format-Table -AutoSize

Output:

DisplayName                                         DisplayVersion InstallDate
-----------                                         -------------- -----------
Microsoft Lync Server 2010, Administrative Tools    4.0.7577.190   20130131
Microsoft Lync Server 2010, Application Host        4.0.7577.0     20130201
Microsoft Lync Server 2010, Audio Test Service      4.0.7577.0     20130201
Microsoft Lync Server 2010, Best Practices Analyzer 4.0.7577.118   20131022
Microsoft Lync Server 2010, Conferencing Server     4.0.7577.709   20141214
Microsoft Lync Server 2010, Core Components         4.0.7577.709   20141214
Microsoft Lync Server 2010, Core Management Server  4.0.7577.0     20130517
Microsoft Lync Server 2010, Front End Server        4.0.7577.707   20141214
Microsoft Lync Server 2010, Mobility Service        4.0.7577.217   20130919
Microsoft Lync Server 2010, Reach Fonts             4.0.7577.0     20130201
Microsoft Lync Server 2010, Resource Kit Tools      4.0.7577.197   20130808
Microsoft Lync Server 2010, Web Components Server   4.0.7577.231   20141214
Microsoft Lync Server 2010, Web Conferencing Server 4.0.7577.199   20130201

 
 PS C:\Lync> Get-WmiObject -query 'select * from win32_product' | where {$_.nam

 
 Name                                                Version
----                                                -------
Microsoft Lync Server 2010, Mobility Service        4.0.7577.217
Microsoft Lync Server 2010, Resource Kit Tools      4.0.7577.197
Microsoft Lync Server 2010, Web Components Server   4.0.7577.231
Microsoft Lync Server 2010, Web Conferencing Server 4.0.7577.199
Microsoft Lync Server 2010, Core Components         4.0.7577.709
Microsoft Lync Server 2010, Best Practices Analyzer 4.0.7577.118
Microsoft Lync Server 2010, Core Management Server  4.0.7577.0
Microsoft Lync Server 2010, Audio Test Service      4.0.7577.0
Microsoft Lync Server 2010, Application Host        4.0.7577.0
Microsoft Lync Server 2010, Administrative Tools    4.0.7577.190
Microsoft Lync Server 2010, Reach Fonts             4.0.7577.0
Microsoft Lync Server 2010, Front End Server        4.0.7577.707
Microsoft Lync Server 2010, Conferencing Server     4.0.7577.709

 
 PS C:\Lync> $PSVersionTable

 Name                           Value
----                           -----
CLRVersion                     2.0.50727.5485
BuildVersion                   6.1.7601.17514
PSVersion                      2.0
WSManStackVersion              2.0
PSCompatibleVersions           {1.0, 2.0}
SerializationVersion           1.1.0.1
PSRemotingProtocolVersion      2.1

CU update list:

Lync 2010
CU #Description
CU1http://support.microsoft.com/?kbid=2467763
Description of the cumulative update package for Lync 2010: January 2011
(Version: 4.0.7577.108)
CU2http://support.microsoft.com/?kbid=2496325
Description of the cumulative update package for Lync 2010: April 2011
(Version: 4.0.7577.253)
CU3http://support.microsoft.com/kb/2551268
Description of the cumulative update package for Lync 2010: May 2011
(Version: 4.0.7577.280)
CU4http://support.microsoft.com/?kbid=2571543
Description of the cumulative update package for Lync 2010: July 2011
(Version: 4.0.7577.314)
CU5http://support.microsoft.com/?kbid=2514982
Description of the cumulative update package for Lync 2010: November 2011
(Version: 4.0.7577.4051)
CU6http://support.microsoft.com/kb/2670326
Description of the cumulative update package for Lync 2010: February 2012
(Version: 4.0.7577.4072)
CU7http://support.microsoft.com/kb/2701664
Description of the cumulative update package for Lync 2010: June 2012
(Version: 4.0.7577.4103)
CU8http://support.microsoft.com/kb/2737155
Description of the cumulative update package for Lync 2010: October 2012
(Version: 4.0.7577.4356)
CU9http://support.microsoft.com/kb/2791382
Description of the cumulative update package for Lync 2010: March 2013
(Version: 4.0.7577.4378) 
CU10http://support.microsoft.com/kb/2815347
Description of the cumulative update package for Lync 2010: April 2013
(Version: 4.0.7577.4384)
CU11http://support.microsoft.com/kb/2842627
Description of the cumulative update package for Lync 2010: July 2013
(Version: 4.0.7577.4398)
CU12http://support.microsoft.com/kb/2884632
Description of the cumulative update package for Lync 2010: October 2013
(Version: 4.0.7577.4409)
CU13http://support.microsoft.com/kb/2912208
Description of the cumulative update package for Lync 2010: January 2014

(Version: 4.0.7577.4419)


Lync Server 2010
CU#Description
CU1http://support.microsoft.com/kb/2467775
Description of the cumulative update for Lync Server 2010, Core Components: January 2011
(Version: 4.0.7577.108)
CU2http://support.microsoft.com/kb/2500442
Description of the cumulative update for Lync Server 2010: April 2011
(Version: 4.0.7577.137)
CU3http://support.microsoft.com/kb/2571546
Description of the cumulative update for Lync Server 2010: July 2011
(Version: 4.0.7577.166)
CU4http://support.microsoft.com/kb/2514980
Description of the cumulative update for Lync Server 2010: November 2011
(Version: 4.0.7577.183)
CU5http://support.microsoft.com/kb/2670352
Description of the cumulative update for Lync Server 2010: February 2012
(Version: 4.0.7577.190)
CU6http://support.microsoft.com/kb/2701585
Description of the cumulative update for Lync Server 2010: June 2012
(Version: 4.0.7577.199)
CU7http://support.microsoft.com/kb/2737915
Description of the cumulative update for Lync Server 2010: October 2012
(Version: 4.0.7577.203)
CU8http://support.microsoft.com/kb/2791381
Description of the cumulative update for Lync Server 2010: March 2013 
(Version: 4.0.7577.216)
CU9http://support.microsoft.com/kb/2860700
Description of the cumulative update for Lync Server 2010: July 2013
(Version: 4.0.7577.217)
CU10http://support.microsoft.com/kb/2889610
Description of the cumulative update for Lync Server 2010: October 2013 
(Version: 4.0.7577.223)
CU11http://support.microsoft.com/kb/2909888
Description of the cumulative update for Lync Server 2010: January 2014

(Version: 4.0.7577.225)
  




Source 1
Source 2