Speed up Send/Receive in Outlook 2013 Synchronized Folders

This content is 3 years old. Technology changes with time. Keep that in mind as you read this article.

Ran into a performance issue for an end-user today where the Send/Receive process was hanging on synchronizing subscribed folders.

One method to help speed up this process was to disable calculating the number of unread items each in subscribed folder that are synchronizing.

Step 1

Click on Send/Receive tab in the Ribbon and then click Send/Receive Groups and choose Define Send/Receive Groups

2016-04-25_113309

Step 2

Click Edit in the right pane

2016-04-25_113317

Step 3

Uncheck Get folder unread count for subscribed folders and click OK

2016-04-25_113331

Get All Virtual Machine Guest OS in Powershell

This content is 3 years old. Technology changes with time. Keep that in mind as you read this article.

Continuing with learning some Powershell, I cooked this up which will connect to the vCenter server and get all the VM’s and list the name, operating system and power state.

foreach ($vm in get-vm) {
	$os=get-vmguest -vm $vm.name | 	where-object {$_.osfullname -ne $null} | select osfullname;
	write-host ($vm.name.tostring() + "," + $os.osfullname + "," + $vm.powerstate.tostring()) -ErrorAction silentlycontinue
}

Example Output

VM01,Microsoft Windows Server 2008 R2 (64-bit),PoweredOn
VM02,Microsoft Windows Server 2003 (32-bit),PoweredOn
VM03,Microsoft Windows Server 2008 R2 (64-bit),PoweredOn
VM04,Microsoft Windows Server 2003 (32-bit),PoweredOn

Searching GMail with Regex

This content is 4 years old. Technology changes with time. Keep that in mind as you read this article.

Interesting discussion in IT Professionals community I saw regarding needing to be able to search GMail for some IP addresses.

I’ve tinkered around with a few things and found a pretty easy way to do the regex searches.

Step 1: Setup Google Doc’s Sheet

Source: http://www.labnol.org/internet/advanced-gmail-search/21623/

Follow these directions to the end of #2 below:

  1. Click here to make a copy of the Gmail RegEx sheet into your Google Docs account.
  2. Wait for 10–15 seconds and a new Gmail RegEx menu will appear in your new Google sheet. Choose Initialize from the menu and grant the necessary permissions as requested by the program.
  3. The program will search your entire mailbox by default but if you would like to limit the search to any particular lable (say Inbox or Spam), just put that label name in cell F3.
  4. Now enter any regular expression in the cell F4 and choose “Search Mailbox” from the Gmail RegEx menu to begin searching.

Step 2: Modify Script

We need to modify the script since the subject is what contains the IP address that have been emailed.

Click on Tools > Script editor…

1

When this opens, modify line #32:

Originally, it says:

var msg = messages[m].getBody();

Change it to:

var msg = messages[m].getSubject();

2

Save your script…

3

Search!

Back on the spreadsheet, fill in the search field with the following regex.

d{1,3}.d{1,3}.d{1,3}.d{1,3}

Note: This will match 0.0.0.0–999.999.999.999 — but who cares… we’re not being that strict are we? I’ll leave the exercise to you to filter for proper IPv4 address or even IPv6 hah.

So with the regex entered in, go up to GMail Regex > Search Mailbox

4

Results, Prosper

Here’s an example?—?I sent myself some test messages with some IP addresses in the subject.

5

Office.com Online using WinForms

This content is 4 years old. Technology changes with time. Keep that in mind as you read this article.

This isn’t true API access, just a WebBrowser control. I’m looking into the API though which would require me to register my Application even though it’s not a Windows App.

It has a launcher (I haven’t decided exactly how I’ll integrate this) that will launch the Microsoft Office Online services at the click of a button.

As you can see, you can still access the Navigation provided by Microsoft. I fixed the Winform so it doesn’t launch a new window and keeps everything inside the Winform on the WebBrowser control.

I guess I see this side project being useful for someone who wants to use the free Office.com Online services with their Microsoft account and don’t want the full browser experience.

2014-08-08_141453

2014-08-08_141506

2014-08-08_141519

2014-08-08_141525

Some notes to get this to render properly in the WebBrowser control.

I had to force a User Agent to indicate I was using IE11. I think what I was seeing was that the WebBrowser control was defaulting to MSIE7. Made things look like crap.

VB.NET Code for this:

Private Property uag As String = "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"
     _
    Private Shared Function UrlMkSetSessionOption(ByVal dwOption As Integer, ByVal pBuffer As String, ByVal dwBufferLength As Integer, ByVal dwReserved As Integer) As Integer
    End Function
    Const URLMON_OPTION_USERAGENT As Integer = &H10000001
    Public Function ChangeUserAgent(ByVal Agent As String)
        UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, Agent, Agent.Length, 0)
    End Function

I implemented forcing new windows to the WebBrowser control in the Winform. If you use the top navigation at all, it opened the service in a new Internet Explorer Window.

VB.NET Code for this:

    Private Sub Webbrowser1_NewWindow(sender As Object, e As CancelEventArgs) Handles WebBrowser1.NewWindow
        WebBrowser1.Navigate(WebBrowser1.StatusText)
        e.Cancel = True
    End Sub

Originally, I wanted to just wrap this in a HTA or something simple… but I got errors indicated that I couldn’t pull this in an iFrame. So I tried some Ajax/jQuery stuff in HTA and that was a complete fail (I’m not familiar with ajax/jquery things).

Change User-Agent in WebBrowser Control

This content is 4 years old. Technology changes with time. Keep that in mind as you read this article.

This snippet of code worked when tested in VB.NET application I’m working on. It will set the User Agent string for the duration of the control.

Private Property uag As String = Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
     _
    Private Shared Function UrlMkSetSessionOption(ByVal dwOption As Integer, ByVal pBuffer As String, ByVal dwBufferLength As Integer, ByVal dwReserved As Integer) As Integer
    End Function
    Const URLMON_OPTION_USERAGENT As Integer = &H10000001
    Public Function ChangeUserAgent(ByVal Agent As String)
        UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, Agent, Agent.Length, 0)
    End Function