Unable to Open vSphere Client

If you haven’t kept your vSphere Client up to date then it’s possible that updates from Microsoft to the .NET framework have caused an issue where you are unable to open vSphere Client, receiving the following message:

The type initializer for VirtualInfrastructure.Utils.HttpWebRequestProxy’ threw an exception.

If this is the case you have two solutions to get it going again. The first is the easiest solution, updating to the latest vSphere Client. If you would like to stay at the current vSphere Client version then there is a solution to problem.

Fixing Your vSphere Client

In Explorer, navigate to:

%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\

In this folder there should be a file called system.dll, copy this file to the following folder:

C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\lib

Notes: On 32-bit machines it will be “Program Files” instead of “Program Files (x86)”. You may have to create the lib folder if it doesn’t exist.

In the “Launcher” folder there is a file called “VpxClient.exe.config”. Open this file with a text editor. Near the end of the file before the </configuration> tag add the following lines and save the file:

<runtime>
<developmentMode developerInstallation=”true”/>
</runtime>

Now open the System properties from the control panel, then Advanced System Settings. Inside of the Advanced System Settings you will now need to launch the Environment Variables editor.

Add the following environment variable:

Variable: DEVPATH

Value: C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib

Note: On 32-bit machines it will be “Program Files” instead of “Program Files (x86)”.

Now you should be able to launch your vSphere Client without an issue.

Connect to Exchange Online with Powershell

In my previous post I talked about using Powershell to connect to Office 365 to manage the service. Using that method you will be able to manage user accounts and other settings that only apply to the Office 365 service itself. If you would like to connect to Exchange Online with Powershell to manage users’ mailboxes then Microsoft also provides cmdlets that allow you to perform these tasks.

Prerequisites

Install Microsoft .NET Framework 4.5.x

Install Windows Management Framework 3.0 or 4.0

Launch Powershell

You will want to right click Powershell and use Run as Administrator.

Office 365 Credentials

Now that you have the Powershell window ready to go, issue the following command in the Powershell window. Once you do, it will launch a window requesting your username and password for Office 365.

$cred = Get-Credential

Getting Office 365 Credential

Connecting to Exchange Online

With the credential stored you can now use it to connect to the Exchange Online service.

$exchSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri “https://outlook.office365.com/powershell-liveid/” -Credential $credential -Authentication “Basic” -AllowRedirection

If authentication was successful, you are now connected to your Exchange Online organization and can manage your service from there.

Disconnecting from Exchange Online

Once you’ve finished the Exchange Online management tasks in Powershell you will then need to free up your session by removing it.

Remove-PSSession $exchSession

Connecting to Exchange Online with Powershell

Connect to Office 365 with Powershell

Using the Office 365 web interface to manage a tenant isn’t always the most ideal choice, based on what you’re trying to accomplish, especially if you would like to automatic or perform bulk tasks. Luckily Microsoft provides cmdlets that let you connect to Office 365 with Powershell.

Prerequisites

Install Microsoft .NET Framework 4.5.x

Install Windows Management Framework 3.0 or 4.0

Install Microsoft Online Services Sign-In Assistant for IT Professionals RTW

Install Azure AD Module for Windows PowerShell (x86 or x64)

Launch Powershell

You will want to right click Powershell and use Run as Administrator.

Load Required Modules

Once you have Powershell launched, the first thing you will want to do is load modules that you will need to connect to Office 365 using Powershell. Issue the following command in the Powershell window to load the MsOnline module.

Import-Module MsOnline

Office 365 Credentials

Now that you have the MsOnline module loaded you’re going to need to get and store your Office 365 credential in a variable. Issue the following command in the Powershell window. Once you do, it will launch a window requesting your username and password for Office 365.

$cred = Get-Credential

Getting Office 365 Credential

Connecting to Office 365

With the credential stored you can now use it to connect to the service.

Connect-MsolService -Credential $cred

If authentication was successful you are now connected to your Office 365 organization and can manage your service from there.

Connect to Office 365 with Powershell

Checking Registry Binary Values With Labtech

If you’re one of the managed service providers who is actively using Labtech for more than just remotely logging into machines then you’re already above those that are not . If you’re digging in and writing your own scripts then that’s another notch for you. Labtech is a very powerful tool when it is used correctly.  You might come across the need to write a script that will perform the task of checking registry binary values with Labtech. There is a gotcha that you should be aware of that is present in atleast Labtech 2013.1. When performing a binary value registry check with the equals comparator you may notice that your check isn’t returning a success when it should be. Below is the solution to this problem.

Let’s say you’re looking for the following binary value to be present (in hex): 00,00,0F,4E,00

If you perform the registry check in Labtech scripting with that specific value, it will not return a success if the value matches. The reason for this is due to Labtech stripping the leading zeroes in the hex values when it pulls it from the registry.

To search for a binary value you simply need to strip the leading zeroes in your registry check. The correct representation of the above example would be: 0,0,F,4E,0

Stop Exchange 2010 From Changing Resource Calendar Subject Lines

If you’re using resource mailboxes in Exchange 2010 and have it automatically process meeting invites, then you may notice that the subject lines are getting stripped and replaced with the organizer’s name. Depending on how you are using the resource mailbox, this may be an undesired action. If you wish to leave the original subject in the calendar entry, run the following command in the Exchange Management Shell:

Set-CalendarProcessing -Identity ResourceMailbox -AddOrganizerToSubject $false -DeleteSubject $false

Page 1 Page 2 Page 3