Camera App/Function is missing after connecting mobile device to Exchange 2010 mailbox

If you connect an iPad, iPhone or any mobile device that supports Exchange ActiveSync to your Exchange 2010 account; you might find that the Camera app/function becomes missing. You're not alone :)

This is because the new Exchange server versions have device-specific restrictions available for ActiveSync. If the email administrator did not change the default Exchange ActiveSync policy, then this will be a familiar scenario.

I will not waste time trying to explain why this particular restriction is enabled with Exchange, let me just tell you how it can be enabled so that everyone can be happy.


  1. Open Exchange Management Console
  2. Go to "Organization Configuration > Client Access"
  3. Select the "Exchange ActiveSync Mailbox Policies" Tab
  4. Select the Policy you wish to edit, in this example it is the "Default".  
  5. Select the "Device" tab and make sure that the "Allow Camera" box is checked.    
  6. Go to the "General" tab and check the "Refresh Interval (hours)" box and put the value of 1.
  7. Click OK.
  8. Restart the "Microsoft Exchange RPC Client Access" service in each Client Access Server.

After all that, recreate the Exchange Account setup in the mobile device to apply the new policy settings.

Good luck!
Share:

Add User or Group as Member of Local Group During User Logon

These two little people at work asked me if I could help them with this script to automatically add a domain user or group to the local administrators group. Just thinking about how they've been trying to do it for weeks already with no success was enough challenge for me; so without really thinking if it would fit in my workload, I agreed to help these little guys.

The assumptions:
  1. Script will run during computer startup.
  2. GPO will be applied to specific computers
I whipped up this script and added it to the Computer Startup section. After testing and verifying that it worked, they suddenly changed their minds.

New requirements:
  1. GPO will NOT be restrictive to any specific computer but;
  2. GPO will NOT be applied to ALL computers. (Should only be applied to a computer if the member user logged on to it)
So I didn't have a choice but to implement the GPO on User Logon which posed another challenge; user logon scripts run under the credentials of the user who logged on.. and if the user don't have local administrator privileges the script will just fail with "access denied" error.

Hitting that wall, the obvious workaround was to use impersonation inside the script which means using an account that have Domain Admin privilege to run the WMI code in the script. That however, is a very bad idea because doing that requires to have the username and password incorporated in the code, the code which is in plain text.

So the new challenge now:
  1. Run the Logon Script with Domain Admin privileges.
  2. The end-product of the code must NOT be in plain-readable-text to protect the account from being compromised.
Encrypting the VBS to VBE is not a very considerable option. Why? Because ever since I started learning VBS, I have decrypted lots of VBE's so that I can study them.. and the Decryption mechanism is always the same.

The only way to go for me is to compile the vbScript into an EXE binary.
This is where PrimalScript came in handy.

THE CODE

'==========================================================================
'
' NAME: AddToLocal.vbs
'
' AUTHOR: June Castillote, june.castillote@gmail.com
' DATE  : 3/22/2012
'
' USAGE: AddToLocal.vbs [Domain Group/User] [Local Group]
'
'==========================================================================
Set objArgs = WScript.Arguments

If objArgs.Length=0 Then WScript.Quit '<--------- font="font" if="if" not="not" run="run" script="script" size="2" will="will">no arguments specific


Const strComputer = "."
Dim objNetwork, objGroup, objUser, strUsername, strGroupName
Set objNetwork = WScript.CreateObject("WScript.Network")
strGroupName = CStr(objArgs(0))
Set objGroup = GetObject("WinNT://" & strComputer & "/" & cstr(objArgs(1)))
Set objUser = GetObject("WinNT://" & strGroupName)
If (objGroup.IsMember(objUser.ADsPath) = False) Then
    objGroup.Add(objUser.ADsPath)
    MsgBox    "Your account/group " & CStr(objArgs(0)) & " has been added to the Local " & cstr(objArgs(1)) & " Group. Please logout and log back in for the privileges to take effect"
Else
    MsgBox    "Your account/group " & CStr(objArgs(0)) & " is already a member of the Local " & cstr(objArgs(1)) & " Group. No further actions needed."
End If 

'========================================================================== 


COMPILE USING PRIMALSCRIPT

  



Enter the account that is already a member of the Local Administrator (usually a domain admin account) the the script will use as "Run As" credential



APPLY TO GPO

You should know how to do that!

OUTPUT








If the user logged in on that computer is not a member of the local group yet, the script will trigger and will see the message box below.



If the Account/Group is already added to the local group, the message box below will appear.


PrimalScript is a commercial software however, if you do not want to use this option of compiling to EXE, you can just modify the script to include the Username and Password in the WMI string - which exposes your the credentials in plain text.




 
Share:

Password Generator

When you handle User Account Management, you either use a default password (which is in itself vulnerable) or generate a random password.. most likely using an online tool. It's all good for me but I would like to have a utility that I can use which can be accessed on my desktop quickly. This is why I created this small utility to create random passwords.

Nothing much to say about it and you can very much figure it out on your own.


Download Link:
Randomizer v1.0
Share:

Exchange Server Data Collector [DISCONTINUED]

Update [11/21/16]:
  • This project has been discontinued.
  • For Exchange 2010/2013, use the PowerShell version from this LINK
Update [2/20/13]: v2.8
  • Fixed TB size handling of disk space
  • Other stuff that I can't remember anymore :)
Update [7/17/12]:
  • Added Performance Counter Object to extract Log Generation Checkpoint Depth of each storage groups.
  • Added Reminders/Description after each section.
  • These changes are only for Exchange 2003 (so far)



If you manage Exchange Servers, it is always good to have the ability to gather Exchange server status report on demand or by schedule depending on how frequent you want to be informed about the current state of your boxes. Sure you can always log in to your server and check the services, mount status, disk space, mail queues one by one; or you can use commercially available products for a fee. Well as for me, I do not like paying for anything that I can find a free alternative counterpart which can very much do the same thing.

This is why I created this tool I call Exchange Data Collector, and for lack of imagination and creativity it's nick-named as ExDaC2003/ExDaC2010. This program can be run manually or can be set up as Scheduled Task and will gather the information listed below the create an HTML report. The report can be sent via email or you can create a new virtual directory in IIS and host it for online viewing.

The data collected by this small program are:

Mailbox Database

Message Queues

Services

Disk Space




How it works?


When you run this program, listed below are what basically happens.

For Exchange 2003

  1. Read INI file for configuration
  2. Log on to each specified Exchange Servers
    1. Extract Mailbox data using CDOEXM.dll
    2. Extract Mail Queue data using WMI
    3. Extract Services data using WMI
    4. Extract Disk data using WMI 
  3. Save raw data to temporary file
  4. Read raw data and generate the HTML report
  5. Send HTML report via email (if enabled)
  6. Delete temporary files
  7. Cleanup memory allocation
For Exchange 2010
  1. Read INI file for configuration
  2. Initiate a PowerShell runspace and execute PS Scripts for the following:
    1. Extract Mail Store Data
    2. Extract Mail Queue data
    3. Extract Services Data
    4. Extract Disk data 
  3. Save raw data to temporary file
  4. Read raw data and generate the HTML report
  5. Send HTML report via email (if enabled)
  6. Delete temporary files
  7. Cleanup memory allocation
How do I use this?

This is a console application, meaning it's manipulated via command line (sorry no GUI).
Usage:
 ExDaC2003.exe File.ini
 ExDaC2010.exe File.ini
- ExDaC2003.exe/ExDaC2010.exe is the main executable
- File.ini is the configuration file that the programs reads before executing any of its functions. You can create different INI files with different configurations as you wish.

What does FILE.INI contain?

It contains the list of parameters that will be used for all the functions of the program.

Here's an example:
======================================================
[OPTIONS]
;Specify which data is to be reported (TRUE or FALSE)
xDatabase=True
xQueue=True
xService=True
xDisk=True
[SERVERS]
;When specifying multiple values, seperate with semi-colon and must end with semi-colon
;This is the list of the servers that will be queried.
ServerName=DEVSVR01;DEVSVR02;

[SERVICES]
;When specifying multiple values, seperate with semi-colon and must end with semi-colon
;This is the list of services that will be queried for each of the servers listed under the SERVERS section
ServiceName=MSExchangeIS;MSExchangeMTA;MSExchangeSA;MSExchangeMGMT;MSExchangeES;Resvc;IISAdmin;POP3Svc;IMAP4Svc;W3SVC;SMTPSVC;

[SMTP]
;Specify only ONE SMTP server IP and PORT
SMTPServerIP=192.168.56.250
SMTPServerPort=25

;Populate this item if the SMTP server requires authentication, usually this is not the case.
;Accepted values are only TRUE or FALSE
AuthRequired=False

;If AuthRequired=True, you need to fill in this information for the login credentials.
;The format is DOMAIN;UserName;Password
Creds=

[REPORT]
CompanyName=LabWorks

Sender=
administrator@labworks.local

;When specifying multiple recipient, separate with COMMA
Recipients=administrator@labworks.local,administrator2@labworks.local

;This is the Title that will be shown in the HTML report and also the Subject of the email report.
;The program will automatically append the DATE and TIME in this string
ReportTitle=LabWorks Exchange Server Status Report as of

;This item indicates if the program will send the report via email
;EmailReport= True or False
EmailReport=True

;This can be any value. This is needed so that the email report will be less likely to be considered as spam.
XMailer=Exchange Data Collector

;This will be the prefix of the HTML output file. The date and time will automatically be appended.

;The report will be saved here: \objects\reports
ReportFile=LabWorks_

;Specify here the value which will be considered normal for the mail queue, anything above the value specified here will be shown as critical.
QueueThreshold=25

;Specify here the value which will be considered normal for the disk space free percentage, anything above the value specified here will be shown as critical.
DiskThreshold=15


;How old (in days) the last full back up must be before warning - 0 means no checking
LastFullBackupThreshold=7

;How old (in days) will the last incremental backup must be before warning - 0 means no checking
LastIncrementalBackupThreshold=0 


 ;Log file name number threshold before the log sequence should be restarted. anything above the value specified here will be shown as critical.
;Default value for warning as per Microsoft is 950000.
;Max before auto-dismount is 1030000
LogNumberThreshold=950000

;Log file name number threshold before the log sequence should be restarted. anything above the value specified here will be shown as critical.
;Max value before auto-dismount is 1008
LogDepthThreshold=900
======================================================

What does this program require?


The following must be present in the server/computer running this program.

For Exchange 2003
  • .NET Framework 2.0
  • Microsoft Exchange Management Tools
For Exchange 2010
  • .Net Framework 3.5
  • Microsoft Exchange Management Tools
Where can I get this program?

Here:
ExDaC 2003 Version 2.8
ExDaC 2010 Version 2.3

Reminders

  • As always, use with caution as I do not give any warranty or guarantee that this will work for everyone.
Share:

Popular Posts

Powered by Blogger.