Archive for PowerShell

Preview PowerShell Scripts in File Explorer

The ability to preview PowerShell (.ps1) scripts from Window’s File Explorer is not enabled by default, or so it seems. A quick one line PowerShell command fixes that in a jiffy!

  • Right click on PowerShell and select to “run as administrator”
  • Then copy and paste the following:
    Set-ItemProperty Registry::HKEY_CLASSES_ROOT\.ps1 -Name PerceivedType -Value text


That’s it! Open up File Explorer and you’ll now be able to preview PowerShell scripts!

P.S. This was tested on Windows 10

PowerShell for O365 Now Available!

Microsoft announced yesterday (June 30, 2015) the availability of the PowerShell for Office 365 for IT administrators.


I would suggest that you first read their blog post on Getting Started with PowerShell for O365.

PowerShell for O365 is not intended to replace the O365 Admin Center, but rather it provides complementary tools for such scenarios as:

  • Adding or editing a large number of users
  • Using multiple filters when sorting data
  • Exporting data such as user lists and groups
  • And more …

The web site includes sample scripts, scenarios, and community interaction. Check it out!

Display Exchange 2010 version

Working with Exchange 2010 and SBS 2011, you should expect to become familiar with PowerShell. Here’s a quick easy solution for displaying the version of Exchange 2010 installed on a server:


  1. Start the Exchange Management Shell (EMS). Give it a few seconds to start up.
  2. From the PowerShell [PS] prompt, type: get-exchangeserver | format-table name, *version*
    Note: the above PS command is NOT case sensitive
  3. Compare your result to the following table (see this Microsoft Technet page):
  • Microsoft Exchange Server 2010 – Build 14.0.639.21 – Date 11/9/2009
  • Microsoft Exchange Server 2010 SP1 – Build – Date 8/24/2010
  • Microsoft Exchange Server 2010 SP2 – Build – Date 12/4/2011

In my case (see screenshot above), I have Version 14.2 (Build 247.5) which indicates that I have Exchange 2010 SP2 installed.

WMF 3.0 and Exchange 2010

Short and simple: if you are running Exchange 2010 or Sharepoint 201, DO NOT install Windows Management Framework 3.0 (WMF 3.0).

For a slightly more descriptive explanation, check out my good friend Michael Smith’s blog post.