// This is the script to give summary on the main page.
Think IPM

Thursday, May 23, 2013

Scripting in Outlook – Stuck Draft messages.

My buddy Jeff Miller sent over this crafty Outlook script that he thought someone might find useful.  Here it is with some background on why he wrote it.


I had a user complain about 500+ emails for an email distribution stuck in her outbox.  My current environment is Outlook 2010 and Exchange 2007.  I couldn’t figure out the reason for why they were stuck so I went down the basic troubleshooting steps.

  • Opening one of them and clicking send - did not help
  • Closing outlook and reopening - did not help
  • Clicking on send/receive - did not help
  • Moving the messages to another folder and dropping them back in outbox - did not help
  • Setting outlook to offline mode and then going back online  - did not help
  • Recreated outlook profile on that users computer  - did not help
  • Opened the mailbox as my blackberry admin on another computer  - did not help
  • I even gave up and rebooted the users computer  - did not help

After searching Microsoft forums, I did find that this is a common issue and some say the steps above helped them out, and others said it didn’t.  I found a post where someone mentioned putting them into the drafts folder and opening the email and clicking send.  This solution did work for me  but there was no way that I was going to do this 500+ times, and I am sure my user wouldn’t either.  I quickly searched and found a post on how to write a script to email all items in the drafts folder which turned out successful for me.

Link #1 & Link #2


It took me a minute to figure out the parent folder name, so I commented that explanation into the



  1. Start Outlook and choose Tools, Macro, Visual Basic Editor (or press Alt+F11) to open the VBA Editor.
  2. In the Project window, select Project1 and expand the tree until you see ThisOutlookSession.
  3. Select ThisOutlookSession and press F7 to open the Code window.
  4. Enter the following in the Code window:.


Public Sub SendDrafts()
Dim lDraftItem As Long
Dim myOutlook As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myFolders As Outlook.Folders
Dim myDraftsFolder As Outlook.MAPIFolder
'Send all items in the "Drafts" folder that have a "To" address filled in.
'Setup Outlook
Set myOutlook = Outlook.Application
Set myNameSpace = myOutlook.GetNamespace("MAPI")
Set myFolders = myNameSpace.Folders
'Set Draft Folder.
The name of the parent folder is the line directly above your inbox in outlook, in this case it was the users email
address.
Set myDraftsFolder = myFolders("put name of the parent folder of your draft folder in here").Folders("Drafts")
'Loop through all Draft Items
For lDraftItem = myDraftsFolder.Items.Count To 1 Step 1
'Check for "To" address and only send if "To" is filled in.
If Len(Trim(myDraftsFolder.Items.Item(lDraftItem).To)) > 0 Then
'Send Item
myDraftsFolder.Items.Item(lDraftItem).Send
End If
Next lDraftItem
'Clean-up
Set myDraftsFolder = Nothing
Set myNameSpace = Nothing
Set myOutlook = Nothing
End Sub


Click Here to Continue Reading >>

Wednesday, May 22, 2013

Tips for avoiding Citrix Printer Spooler issues

By Jacques Bensimon 

The most important rule I can suggest is that, when adding a printer driver to a print server, use to the extent possible a native Windows driver.  The sequence is as follows:

Printer(1) Using the Print Management console (preferable) or the printer folder’s “Server Properties” dialog (Drivers tab), get into the “Add Driver” wizard (select only x64 for now) and first look to see if the printer model is on the list (if both PCL and PS are available, just pick one – no real reason to have duplicate drivers).

(2) If it is not on the list, click (within the same wizard/dialog) the Windows Update button.  After a while, a new larger list of printer models will appear (but some that were available in step (1) may disappear, so do both).  If the model you want is on the list (it has a good chance of being there), use that.

(3) If it is still not there, go to http://catalog.update.microsoft.com and type the printer model into the search field – an available download for the 2008R2 / Win7 platform may appear.  If so, download that.

(4) If you need to support 32-bit clients, do all the same steps as above, but for steps (1) and (2), do them from a 32-bit Windows 7 machine (build one if you don’t have one – a VM is perfect for this -- and avoid actually installing any drivers on it so its printer list remains “pure”).  The Print Manager console on 32-bit Windows 7 (part of the Remote Server Administration Tools, aka RSAT, an optional component) lets you install a 32-bit driver remotely to a 64-bit print server.

(5) If all else fails, use a download from the printer vendor, but make sure you get the simplest driver possible (no “setup.exe” download, no “printing system” software download, only drivers labeled as “network drivers”, or “inf setup drivers”, or “enterprise driver”, or “add driver wizard driver”, preferable any that are labeled as Citrix-compatible if the vendor has such a classification).  In all cases, they should be drivers that, when downloaded and extracted, can be added via the “Have disk…” feature of the Add Driver wizard on the print server and let you point to a .inf file within the download.

Click Here to Continue Reading >>

Monday, May 20, 2013

WinSxS and reclaiming space

Written by Marcos Velez:

So, some months back I ran into space issues with an internal web server and came across this monstrosity called the WinSxS folder.  At the time, I did all the research I could and learned all too well this folder is a source of frustration for many, many admins.  I also learned there is little that can be done about it, and that messing with its contents is highly discouraged with the usual warnings that it could screw up your system.  ScreenClip

Beyond many uneducated guesses by frustrated Windows admins, and even murkier recommendations to delete things by means of really shady scripts, there was little a person could do to alleviate the space issues associated with the ever-increasing size of this folder.  If you are running Windows Vista (really!?) you can use vsp1clean.exe, and if you have Windows 7 or Windows 2008, you can run compcln.exe.  But, what do you do if you have Windows 2008 R2?  I finally came across a very good solution that reclaims quite a bit of space (more than the compcln.exe utility) and which is available in all Windows 2008 R2 installations.  It is called DISM, which stands for Deployment Image Servicing and Management.  It is meant to manage and administer Windows images, but it does a great job managing an actual Windows installation already in use.  The following command line will do everything that compcln.exe advertises, and it does so efficiently:

dism /online /cleanup-image /spsuperseded /hidesp

For those interested in reading up some more on DISM, here is the technet reference:
http://technet.microsoft.com/en-us/library/dd744256(WS.10).aspx

In any case, some of you may already be familiar with this tool, but it was certainly new to me, and it has helped me tremendously to clean up a few servers.  I hope you find it as useful.

Marcos

Click Here to Continue Reading >>

Friday, May 17, 2013

rant: Office 365 Spam “Protection”.

ScreenClip
17960 legitimate messages and only 70 flagged for SPAM?  I don’t think so Microsoft.  You can’t, with a straight face, call that mail protection.  You just can’t. It’s laughable.  At this point I would rather see those numbers flip flopped.  At least my systems wouldn’t be at risk by the crowds of viruses casually walking past the Forefront protection.
For my part, I wake up to about 25 – 30 spam messages that I end up deleting from my iPhone as I commute in to work.  Some of the messages that get through are not only clearly SPAM but also especially dangerous for the average user.  Phishing schemes, Trojans and other internet nastiness co-mingling in the inbox just waiting for a careless click. 
That’s it.  Back to deleting SPAM.
Click Here to Continue Reading >>

Wednesday, May 15, 2013

Citrix ShareFile Outlook add-in.

I’ve been messing around with Citrix ShareFile a bit and it’s not bad depending on what you are hoping to use it for. 

If you haven’t heard of it, Citrix ShareFile allows you to securely share, store and access documents within it from any of our ever increasing and diversified devices.  Basically an enterprise replacement for everyone’s personal DropBox accounts in your organization.  I won’t get into which is better but they will definitely be pitted against each other in the file sharing/syncing space.

One of the features I really like is the Outlook integration add-in.   Among other things, you can have the add-in grab any attachment over a certain size, upload them to ShareFile and swap it out for a link to the upload.  Very effective for large files being sent through email.  Especially useful when sending outside your organization when size limits might be in place.  Recipients of multiple attachments within a message get the option to zip them before downloading.

image

After sending the attachment link, senders can also optionally get notifications if anyone actually downloads the attachment and expire it if necessary.  It’s pretty slick.

If you have ShareFile already, check out this link for the Outlook download.

Click Here to Continue Reading >>

Monday, May 13, 2013

Uneven XenDesktop DDC load – Check your VDA policies.

Untitled_Clipping_051313_110023_AM 
So you’ve create a bunch of DDCs so that your connections will be appropriately load balanced but when you check on them in the Desktop Studio,  you see a grossly underbalanced farm!  What’s up?

Be sure to check on the VDA policies and that any DDC registration registry entries are correct and appropriate for the desktop OS. 

Registration location on Desktop OS:  HKLM\Software\Policies\Citrix\VirtualDesktopAgent\ListOfDDCs

HKLM\Software\Citrix or HKLM\Software\Wow6432Node\Citrix depending on whether the desktop is 32 or 64 bit.  There should also be a space between each of the DDCs listed in the key’s value.
You can verify successful (or failed) registrations in the Client’s Event Viewer.

Even though a single XenDesktop DDC could potentially support your required load without breaking a sweat, an uneven distribution of desktops across brokers can be a symptom of a configuration error that could be breaking your high availability design.

Click Here to Continue Reading >>