Friday, November 25, 2016

Search mail in all mailboxes

Search mail in all mailboxes in Exchange 2010:

Add user to exchange group - Discovery Management (members of this group can perfomr search of mailboxes in the Exchange organization)

Enable this user  Manage Full Access Permitions to mailbox Discovery Search Mailbox (you will see search result in this mailbox)

Open ECP (Exchange Control Panel) from brouser and log on.

Open Reporting.






Thursday, November 17, 2016

Uninstall an Application from the CMD

Open CMD as Administrator:

wmic:root\cli>
product get name (you will see installed software list)
product where name="" call uninstall

For example:

product where name="SkypeT 7.29" call uninstall

Friday, November 11, 2016

Exchange Management Shell script to export all users mailbox size in specific OU :

Exchange Management Shell script to export all users mailbox size in specific OU :

get-mailbox -DomainController dc01.test.local -OrganizationalUnit "test.local/OU-test/" -resultsize unlimited | sort Name | %{
$Size=Get-MailboxStatistics $_.SamAccountName

$_ | Select-object Name, SamAccountName, @{Name="Size";Expression={((($Size).TotalItemSize).value).toMB()+((($Size).TotalDeletedItemSize).value).toMB()}}} | export-csv -encoding unicode -NoTypeInformation c:\tmp\test1.csv

Friday, November 4, 2016

Install Failover IIS Cluster using Powershell

   Check installed rolles NLB and IIS
Get-WindowsFeatute -name NLB,web-server

  Install roles web server and nlb on 3 servers from 1 console:
Invoke-Command –ScriptBlock {Add-WindowsFeature –Name NLB, web-server,wb-asp-net,webapp-dev,Web-ISAPI-Filter -IncludeManagementTools} –Computername iis01,iis02,iis03

  Create Nlb Cluster:
New-NlbCluster –hostname iis03 –OperationMode Multicast –ClusterName nlb01 –InterfaceName ethernet0 –ClusterPrimaryip 192.168.128.50 –SubnetMask 255.255.255.0

  Show NLB cluster
Get-NLBcluster –hostname iis03
$NLB= Get-Nlbcluster –hostname iis03

  ADD nodes to NLB cluster :
Add-NlbClusterNode –InputObject $Nlb –NewNodeName iis01 –newNodeInterface Ethrnet0
Add-NlbClusterNode –InputObject $Nlb –NewNodeName iis02 –newNodeInterface Ethrnet0

  Open TCP 80 port on firewall :
Set-NlbClusterPortRule –HostName iis03 –NewStartport 80 –NewEndPort 80

  ADD Dns record for cluster name :

Add-DnsServerResourceRecordA –ZoneName corp.local –Name nlb01 –Ipv4address 192.168.128.50