Home » How-to

Category Archives: How-to


Access and Manage Office 365 with PowerShell

As businesses large and small move operations to the Microsoft cloud in the form of Office 365, administrators have to face some limitations in the user interface. While very simple to use for basic administrative tasks, some things can only be done using PowerShell, while other tasks are far faster and easier using this scripting tool as well.

In the blog I will show you how to set up your PowerShell environment to quickly connect to your Office 365 service and help you carry out these functions quickly and easily.

The steps will be as follows:

  1. Check your Execution Policy in PowerShell
  2. Check for, or create, a PowerShell Profile
  3. Edit the Profile to add the needed function
  4. Test the connection

Using Windows 7 or Windows 8 you will find that PowerShell is part of the operating system environment. In Windows 7 there is a pinned shortcut on the taskbar. Opening PowerShell either using this pinned application or by using the Start Menu is the first step. While in PowerShell we need to examine your current settings for executing scripts. This is referred to as the Execution Policy and can be retrieved by typing “get-ExecutionPolicy”. If your response is something other than RemoteSigned you need to set a new policy by typing: “set-ExecutionPolicy RemoteSigned”. You can then confirm that your setting is correct by repeating the “Get-ExectionPolicy” command. There are other choices in PowerShell, but this will suffice for our project. For more information in PowerShell type ” help about_Execution_Policies”.

Next, we want to locate the profile that is associated with your PowerShell environment. To learn more about profiles, type “Help about_profiles”. To locate your current profile, if it exists, type $profile. What returns should be a string that shows the complete path to your current profile. When you learn about profiles in PowerShell you will see that there are several locations in which these profiles can be kept and each has a different impact on how stored functions and scripts might be accessed on your machine.

If no profile exists, you will need to create one. You can test for the existence of a profile by typing, “test-path $profile”. If the response is False, we need to create one, if the response is True, you can simply type $profile to check the path as I pointed out above.

To create a new profile type the following:

if (!(test-path $profile)) {new-item -type file -path $profile -force}

This command tests for the existence of a profile and if none (!) exists, creates a new one.

Now the heavy lifting, which is to create a script or function to help you automatically log on and connect to your Office 365 service. First type, “notepad $profile”. While in Notepad, type the following code:


function admin365

{        $LiveCred = Get-Credential;$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection;Import-PSSession $Session



Don’t forget the braces, {}.

This code does three things: 1.) It creates a function called “admin365”, 2.) prompts you for your credentials on Office 365 in the form of a dialog box, and 3.) creates a new session to connect you to your Office 365 environment and extends the commands available for you to manage your Exchange environment. Notice the use of a semicolon to separate commands in the string. Items starting with a “$” indicate variables in PowerShell.

Save, the notepad file. Exit from PowerShell and restart a new PowerShell session, which will now utilize your new profile. Since this profile has defined a function for your use, call it from the command line by typing “admin365“. A dialog box will pop up. Enter your credentials, click OK and wait for the connection strings to finish. Once done, you can type “get-command” to see all the new commands that are now at your disposal to help you manage your environment.

Now you can do work in Office 365 using PowerShell. Want to get a list of users? Type, Get-User. Want to see information concerning a user’s mailbox? Type, “Get-mailbox username | fl“. To set maiobox permissions, type “set-mailboxpermission username -Accessrights moreparameters. ” For what follows in parameters see “help set-mailboxpermission”. To see all the commands available, type “get-command”.

Using PowerShell can be very helpful, but there is much to learn about this scripting environment. Consider using on-line tutorials and instructor-led classes provided by Microsoft.


Deleting a SharePoint Library

Sometimes it happens that we need to trim old libraries and delete them from our SharePoint site. Sometimes we are just looking to reorganize our site. In any case, the following video will help you learn how to delete a SharePoint library…

Win8 Hyper-V

In order to use the new virtualization service in Windows 8 your processor needs to support a feature referred to as Secondary Level Address Translation (SLAT). Without SLAT, you will not be able to add the Hyper-V service to your host, so it would be helpful to know if you have this available or not.


This article from How-To-Geek ( http://www.howtogeek.com/73318/how-to-check-if-your-cpu-supports-second-level-address-translation-slat/ ) will explain more about SLAT and how to download a great tool from Mark Russinovich called CoreInfo. This tool gives you the information you need to see if your processor supports SLAT. Here is the direct link to his download, http://technet.microsoft.com/en-us/sysinternals/cc835722.


In order to install Hyper-V on your Win8 machine you need to access the Programs and Features applet within Control Panel. (Same idea as in Win7). If you are using a mouse-driven version of Win8, hover your mouse in the far bottom left-hand corner and right-click while you see a thumbnail of the Start Page. A new menu will open from which you can select Control Panel. In Control Panel, select Programs.


After you have clicked on “Turn Windows Features On or Off” you will see the following:



Enable Hyper-V by putting a checkmark in the appropriate box. Notice in the above image that “Hyper-V Platform” is greyed out. This is because this host does not have support for the SLAT capabilities discussed above.

In order to manage Hyper-V you can access the Management Console via Administrative Tools, also in Control Panel. Go to “System and Security”



Once in Administrative Tools, you will see a choice to manage Hyper-V:



Open up Hyper-V Manager and you can start building your virtual environment. I recommend right-clicking on the shortcut and choose to pin to your Start Menu, and, if you like, pin to your task bar.



That’s all for today on WIn8 Hyper-V installation.

Blogging with OneNote 2013

We’re all about the blogging, right? As a matter of fact this blog post has been created using OneNote 2013. And if you are using OneNote 2010 you can still blog using this application! What makes OneNote so ideal for blogging? It is the perfect tool for assembling information from many sources, web -based, screen shots, data from other applications, all in one place. And then, simple drag and drop, and voila! You have a blog post. In fact, OneNote uses the functionality built in to MS Word 2013 and Word 2010 to enable this feature.
So what are the steps?

  1. Create Content
  2. In OneNote, on the menu bar, choose File | Send| Send to Blog
  3. A document containing your content will open in MS Word
  4. Publish!

So let’s take a look, shall we? For our demo we will see this very content which will be posted to our blog. Go to the File menu option and left click.
From the left hand menu choose Send.

At the bottom of the list is Send to Blog. Left click on this choice.

A MS Word document will open containing your blog post. Notice the top left-hand corner where the area labelled Blog contains several options for how you will publish this post. The first time you use this feature you will be required to set up an account that will communicate with your blog host. You can maintain several accounts each pointing to a different host. For example, I have accounts for WordPress, Blogger and SharePoint and I can choose where I want to post my content.

Let’s look at what the Manage Accounts choice will display.

You will need to configure the information for your blog. For example, if you choose to post to WordPress, the blog post URL will prepopulate with a placeholder in brackets (<>) to substitute your own blog URL. Since WordPress can handle images contained in my posts, under Picture Options I have chosen “My Blog Provider” as the picture provider. If your blog service handles images differently you can choose accordingly.

When your account is properly set up all you need to do is click on Publish to send your post to your configured blog!

After your post has been completed you can edit previous posts by clicking on “Open Existing”. If you have created categories for your posts, you can add those at this time as well.

Using OneNote to aggregate your information and then post to your blog can accelerate and improve your blogging experience!

PLEASE NOTE: Images used in your post must be flattened. If you use the drawing tools in OneNote to annotate your images they will not appear correctly in your post. I use SnagIt to mark up my images and flatten them so they appear correctly. You may have your own tool that you prefer,

Working with SharePoint Library

Working with libraries in SharePoint can be as easy as working with traditional file folders. The advantage to placing data in SharePoint is the extra metadata that can be associated with your document, and all the other library features, including alerts, search, RSS feeds and more that can make this information more easily accessible to your colleagues in a collaborative environment. One of the simplest choices is to open your library in a Windows Explorer window and move, open and add data from there. Here’s how…

First, you want to identify the library or libraries you work with most frequently. Go to SharePoint and open that library. At the top of the page you will see a bar that identifies Library Tools. Choose Library.

Now, on the Office Ribbon you will see a section that says, Connect & Export, and in this section choose Open with Explorer. That’s it! A window will open that lists your library files in a normal window and you can drag files into our out of this library as you might in any other file folder. You can create documents in the library (assuming you have permissions) using this same technique.

As an added bonus, using this technique you can attach files to your email if needed. With the library open in your Windows Explorer, right click on the file you wish to send and choose Send To and then Mail recipient.

To save you from constantly opening up this library in Windows Explorer, you can have the library appear in your Favorites menu in Windows Explorer. You can then choose to use this library as you would any other folder in your file system. In the same section as above you will see a choice for Connect to Office. Click on this and then Add to SharePoint Sites. Now this library can be found in your Windows Explorer under your Favorites section.

These tips should help you start using your SharePoint libraries easily and efficiently and remove any barriers to maintaining your documents on the network. There are other ways to synchronize your library to your local drive that we will cover in a future post.

Creating a SharePoint Library

Working with SharePoint libraries is an important skill for anyone managing a SharePoint site. This video help you understand the steps necessary to create a new library for your site.

%d bloggers like this: