Category: Computers and Internet

Exchange: Hide Distribution Group Members


Other day I have been asked to find out if we can hide DL Members. So Users can see the DL in Address Book, but can’t see the members. I found it’s very easy to do. (Microsoft Exchange Rocks!!!)

Here is how you do it.

  1. Open Active Directory Users and Computers console.
  2. Click View Menu and select Advanced Features (to enable it)
  3. Find your Distribution List or Security Group (mail enabled) in the OU
    1. DO NOT search your group. Because if you open the DL/Group properties from search windows, it will NOT show the Attribute Editor which is the advanced feature)
  4. Double click to open the DL/Group to see the properties. Go to Attribute Editor tab.
  5. Find hideDLMembership attribute, double click to open and select True. Click OK twice to close the dialog boxes.

image

It takes a while to take effect the changes while Exchange generates Offline Address Book and Outlook get it. If you want to make the offline address book process faster, follow my blog post here.

In Outlook, DL properties shows like this with hidden members.

image

If we check the DL in OWA, it shows like this:

image

Hope it helped you. Leave me a reply.

Advertisements

Solution: LG G3 is not streaming music to Bluetooth speaker


My LG G3 stopped steaming music to my Bluetooth headset. But the Bluetooth devices are paired and showed up as connected.

When I played a song, it played through phone speaker. I can control volume, and next/previous songs from my Bluetooth device. WTF? I searched Internet, there were users having same exact issue, the suggested solutions wasn’t working. some of them are,

  • Turn off Bluetooth and Turn on again
  • Go to Bluetooth settings on your G3, click on settings for your Bluetooth device, Uncheck Media audio and check it again

The solution that worked for me is

  • make a call using the Bluetooth, while on the call increase the Bluetooth audio sound volume
  • after hang up the call, music started streaming to my Bluetooth speaker

Hope it helps.

PowerShell: Script to generate report by file type/extensions (number of files by extension)


I had a need to count number of files by it’s type. E.g., how many office files, PDF files, etc., I wrote an quick script to generate report on Number of Files by file type (extension) and list of files by file type. Go ahead use my script if you want. Script generates two CSV files on your current working directory.

.docx   150
.txt    138
.pdf    95
.doc    86
.JPG    60
.xls    43
.vsd    32
.xlsx   24
.msg    15
.html   11

Download the PowerShell Script : http://1drv.ms/1rX3iVF (or copy/paste the below script)

param ($path)

<#
Script Name: Generate-Report-by-FileType.ps1
Purpose: Count the number of files by file extension for the given path. Write
the results in a CSV file on the current working folder.
Written By Anand, the Awesome, Venkatachalapathy
Date Written: Sep 10 2014

    Parameters: Path name (e.g., C:\users\awesome\, \\fileserver1\share1)
#>

# file name to log file extension and number of files by the type
$filetypelist = “.\Directory report for ” + (Split-Path -Path $path -Leaf) + “.csv”

# file name to log file list by extension
$filelist = “.\File report for ” + (Split-Path -Path $path -Leaf) + “.csv”

#Search the given path and group the results by Extension
$DirInfo = Get-ChildItem -Path $path -Recurse | where { -not $_.PSIsContainer } | group Extension  | sort count -desc

#Write the results in to log files
“Extension Name`tFile Count” | Out-File -FilePath $filetypelist
foreach($f in $DirInfo)
{
$f.Name + “`t” + $f.Count
$f.Name + “`t” + $f.Count | Out-File -FilePath $filetypelist -Append

“File Report on Extension`: ” + $($f.Name) + ” (Count`: ” + $f.Count + “)” | Out-File -FilePath $FileList -Append
($f.Group.FullName).Replace(“e`:\”,”\\corp.intusurg.com\files\document-control-old\”) | Out-File -FilePath $FileList -Append
“`n`r`n`r” | Out-File -FilePath $filelist -Append
}

Windows Mobile 6.x: Increase your Internet Browsing speed


This trick (from XDA Developers) worked great on my HTC Touch Diamond 2. I doubled my browsing speed. This following tip involves editing the registry on your Windows Mobile phone. Get one of those free Registry editor at http://www.freewarepocketpc.net/ if you don’t have one already.

1. Locate the following key in the registry:

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings

2. Create DWORD Value as below, and then add the following registry values:

Value name: MaxConnectionsPer1_0Server
Value data: 32
Base: Decimal

Value Name: MaxConnectionsPerServer
Value data: 16
Base: Decimal

3. Exit Registry Editor.

4. Soft Reset your phone

That’s it. To make sure to prove it did something, do a Internet speed test on your phone before and after registry setting.

ISA 2004: OWA, RPC/HTTP, OMA, ActiveSync on same Listener (works)


Here is one conflicting information goes around the Internet. ISA 2004 cannot publish all four Exchange features (OWA, OMA, ActiveSync and RPC/HTTP) in one single listener. I have searched the Microsoft site (technet) and ISAServer.org.  Here is the links for related ISA 2004 and Exchange publishing.

http://www.microsoft.com/technet/isa/2004/plan/outlook_web_access_publishing_ee.mspx

http://www.microsoft.com/technet/isa/2004/library/default.mspx

http://www.isaserver.org/articles/2004pubowartm.html

http://www.isaserver.org/tutorials/Redirecting-OWA-Users-Part1.html

http://support.microsoft.com/kb/839357/en-us

http://www.isaserver.org/articles/2004unihomedowapart1.html

 

None of the above links describes how to run all 4 features published in one single listener on same External network card. The problem I am talking about is this….

-OWA needs to be setup with Forms Based Athentication on ISA 2004 server (more secure design)

– Rest of the items (OMA, ActiveSync and RPC/HTTP) requires Basic Authentication (over SSL). Outlook 2003 or mobile devices will not handle the Form Based Authentication, so it needs to be on Basic authentication.

So, all the Microsoft and other documents leads to create two different listeners (one with FBA and one with Basic authentication). Two listener cannot listen on same IP address and same port (443). Two different listener means two different IP addresses.  And it also means two different domain names (owa.xxx.com and rpc.xxx.com). It complicates more like we have to buy two different digital certifications from provides (VeriSign) unless you choose to run Certificate Services in home.

Then, I found this article and may shed light for the solution: http://www.isaserver.org/tutorials/2004pubowamobile.html.

After I reading the above link, I realized this is not going to work for me. We bought a SSL certificate from legitimate provider and we don’t run certificate services at my company and we don’t plan to setup. For some small business and other companies, it may do some magic.

I was frustrated and about to gave up. I fiddled around and found something in the middle. All four features (OWA, OMA,ActiveSync and RPC/HTTP) are working on a single listener. Here is my setup. See the drawing and I will explain it below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here is the steps:

– Create a Listener called FBA_443_Listener with above settings in the drawing. Note this listener has only FBA selected. Don’t forget to set the default domain (your AD domain). If the users are from different domain in the forest, they have to type "domainusername" format.

– Create a Firewall Rule with Mail Server Publishing Wizard. Name it "OWA Publishing Rule". Select only OWA during the wizard. Setup the rule with above settings as it is in the drawing. When asked, select FBA_443_Listener. You need to enter path after finish creating the rule.

– Create a second firewall rule with Web Server Publishing Wizard and name it "RPC/HTTP,OMA and ActiveSync Publishing Rule". (Note the bold letters, this has to be created using web server publishing wizard and NOT using mail server publishing wizard). When asked, provide the path name as /rpc/* with your OWA domain name (mail.xxx.com). Make sure the settings are correct with above drawing. You need to add all the paths manually after creating the rule.

Voila! It worked. I am no geek on ISA server side, but here the explanation. The magic here is you create the rule for RPC, OMA and ActiveSync using WEB SERVER PUBLISHING WIZARD. I still don’t get it that how Outlook and my Mobile handles Form based authentication with above setup. But some how it handles it.

One possibility is Microsoft made Outlook and WM5 to manage the FBA through the latest patches. OR ISA 2004 with SP2 handles the NON Browser calls with Basic Authentication. So, don’t forget to patch your servers and clients.

Here is the result:

– Outlook Web Access link is provided with FBA logon page

– OMA provided with Basic Authentication page

– ActiveSync works and NO errors

– RPC/HTTP is provided with logon window in Outlook 2003 and it works without errors

This above setup works and I can do all four Exchange features beautifully.  With all that above, I am running ISA 2004 in single network configuration. The listener is set to listen on local network.

Hope it helps someone desperately looking for the information.

Windows 2003 Cluster monitor script for Exchange 2003 server


 

Hello, Here is my another script I made it to monitor my company’s Exchange 2003 cluster. If you run Exchange 2003 server on Windows 2003 cluster, this might help you.

Here are the needs for this script,

– Exchange cluster group might be failover to another node for some reason. I want to know why it did failover and when. Most importantly, How much time it takes to failover.

– For Better practice, I set "affect the group" settings only to very important core resources. If all other resources fails, it will not affect the group and stays failed. If that happens for any reason. I want to know when it happens.

– Run this script from a standalone server. Do not run this on the cluster node(s) itself. It beats the reason for this script. It uses WMI, so it can run from any Windows 2000, Windows 2003 or XP machine.

It’s basic VBScript and I found the help from MSDN website. Anybody can reuse this script by providing the Exchange cluster server name, an SMTP server name and Administrators who needs to receive email alerts.

NOTE: You need to have an SMTP server other than the Exchange server itself. If the Exchange is down on the cluster, you need to send alert mails via different SMTP server.

Questions, leave me reply. OK Let’s get to the script.

 

‘===============================================================
‘ Name: ClusterProbe.vbs
‘ Purpose: Check each Cluster member found for Exchange server,
‘ and Check all properties on the ExchangeClusterResource
‘ objects. If the state is other than 2, send emails
‘ to administrators
‘Written by: Anand Venkatachalapathy
‘Written Date: Sep 9 2006
‘===============================================================

Dim strAdministrators ‘Who supposed to receive alerts

StrAdministrators = "Adminname@company.com;pageremail@pager.com"

Dim sSMTpServerName ‘* sSMTPServerName – SMTP Server Name

‘* SMTP server – This server should not be your Exchange server.
‘* If your Exchange cluster is down, you need to send alerts. So, assign it to
‘* a different Server
sSMTPServerName = "YourSMTPServerName"

Check_Cluster_Resources "YourExchangeClusterName"

‘===============================================================
‘ Name: Check_Cluster_Resources
‘ Purpose: Check each Cluster member found for Exchange server,
‘ and Check all properties on the ExchangeClusterResource
‘ objects. If the state is other than 2, send emails
‘ to administrators
‘ Input: strComputerName [string] the computer to access
‘ Output: If the state is other than 2, calls Alert_Admins sub
‘ to send emails
‘===============================================================
Public Sub Check_Cluster_Resources ( strComputerName )

Const cWMINameSpace = "root/cimv2/applications/exchange"
Const cWMIInstance = "ExchangeClusterResource"
Const ForReading = 1, ForWriting = 2, ForAppending = 8

Dim strWinMgmts ‘ Connection string for WMI
Dim objWMIExchange ‘ Exchange Namespace WMI object
Dim listClusterResources ‘ ExchangeClusterResource collection
Dim objExchangeConnector ‘ A single ExchangeClusterResource WMI object
Dim strResourceName
Dim strVirtualMachine
Dim strNodeName
Dim numResourceState, strStateDescription
Dim strResourceType
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("ClusterProbe.log", ForAppending, True)
f.WriteLine vbCRLF & "————————————————————–"
f.WriteLine Now & "- Checking cluster resources for " & strComputerName

‘ Create the object string, indicating WMI (winmgmts), using the
‘ current user credentials (impersonationLevel=impersonate),
‘ on the computer passed to the function in strComputerName, and
‘ using the CIM namespace for the Exchange provider.
strWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//" & strComputerName & "/" & cWMINameSpace


‘ Get an object using the string you just created.
Set objWMIExchange = GetObject(strWinMgmts)


‘ The Resources that currently exist appear as a list of
‘ ExchangeClusterResource instances in the Exchange namespace.
Set listClusterResources = objWMIExchange.InstancesOf(cWMIInstance)


‘ Were any ExchangeClusterResource Instances returned?
if (listClusterResources.count > 0) then
‘ If yes, do the following:
‘ Iterate through the list of ExchangeClusterResource objects.
For each objExchangeConnector in listClusterResources
‘===============================================================
‘Following Values are taken from MSDN EXchange/Cluster website
‘Cluster Resource State descriptions:
‘ClusterResourceStateUnknown = -1,
‘ClusterResourceInherited = 0,
‘ClusterResourceInitializing = 1,
‘ClusterResourceOnline = 2,
‘ClusterResourceOffline = 3,
‘ClusterResourceFailed = 4,
‘ClusterResourcePending = 128,
‘ClusterResourceOnlinePending = 129,
‘ClusterResourceOfflinePending = 130
‘===============================================================
numResourceState = objExchangeConnector.State
strResourceName = objExchangeConnector.Name
strVirtualMachine = objExchangeConnector.VirtualMachine
strNodeName = objExchangeConnector.Owner
strResourceType = objExchangeConnector.Type
If numResourceState <> 2 Then
Select Case numResourceState
Case -1
strStateDescription = "Unknown"
Case 0
strStateDescription = "Inherited"
Case 1
strStateDescription = "Initializing"
Case 2
strStateDescription = "Online"
Case 3
strStateDescription = "Offline"
Case 4
strStateDescription = "Failed"
Case 128
strStateDescription = "Pending"
Case 129
strStateDescription = "OnlinePending"
Case 130
strStateDescription = "OfflinePending"
End Select
f.WriteLine strResourceName & " is NOT online at " & strNodeName
f.WriteLine "Alerting Administrators…."
strTo = strAdministrators
strSub = "<Exchange Cluster> " & strStateDescription & ": " & strResourceName
strBody = strResourceName & "(" & strVirtualMachine & ") is hosted at " & strNodeName & vbCRLF
strBody = strBody & strResourceName & "’state is changed to " & strStateDescription & vbCRLF
strBody = strBody & strResourceName & "’s type is " & strResourceType & vbCRLF & vbCRLF
Alert_Admins strTo,strSub,strBody
f.WriteLine "Alert sent to " & strAdministrators
Else
f.WriteLine strResourceName & " is ONLINE at " & strNodeName
End If

‘ Move to the next ExchangeClusterResource.
Next
else
‘ If no ExchangeClusterResource instances were returned,
‘ display that.
f.WriteLine "No ExchangeClusterResource instances were returned."
strTo = strAdministrators
strSub = "<Exchange Cluster> " & strComputerName & " is not responding"
strBody = strComputerName & " is not available on the network"
Alert_Admins strTo,strSub,strBody
f.WriteLine "Alert sent to " & strAdministrators
end if
f.close
end Sub

‘===============================================================
‘ Name: Alert_Admins
‘ Purpose: Send email using smtp server.
‘ Input: strTo – Who to send to, strSub – Subject of the message
‘ strBody – Body of the message
‘ Output: Sends the emails to the strTO recipients
‘===============================================================
Sub Alert_Admins( strTo,strSub,strBody)
‘* iMsg – holds CDO.Message object
‘* Flds – Enumeration for CDO SMTP object properties
‘* iConf – holds CDO.Configuration
Dim iMsg, Flds, iConf

‘* Assign cdoSendUsingPort is set to 2, i.e., send using SMTP (25) port
Const cdoSendUsingPort = 2

‘* Create CDO Objects and assign to variables
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

‘* Assign values to Flds class properties

With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sSMTPServerName
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 25
.Update
End With

‘* Assign message properties and Send the mail
With iMsg
Set .Configuration = iConf
.Fields("urn:schemas:httpmail:importance").Value = 2 ‘Setting Mail importance to High (2)
.Fields.Update
.To = strTo
.From = "AdminAlerts@company.com" ‘Fake, but make-sense email FROM address
.Sender = "Administrator@company.com" ‘Return Email address
.Subject = strSub
.TextBody = strBody
.Send
End With

End Sub