Office 365 PowerShell – Help and additional information 4/5 (1) 3 min read

Help and additional information

  • Naming convention for the PowerShell sample that is used in the articles.
  • Tips about that recommended way for working with the PowerShell sample.
  • Basic introduction to the PowerShell command logic.

Naming Conventions

The PowerShell command “box” includes:

  • PowerShell command: Representation of the variable will be displayed in bold triangular brackets <Variable>.
    The Variable could be: User alias name, User email address, Distribution group name, Mailbox name etc.
  • Example Section: for making the PowerShell command Syntax more clear, we will demonstrate the command using “Real” names.
  • Adjustments & Customization: This section includes “improvement” to the PowerShell command. For Example: “filtering” the output results. Sometimes, we get too much information or additional formation that is not related to the information that we need. Additional example could be avoiding the need to “Confirm” the PowerShell command and more.

PowerShell Script Menu

Most of the PowerShell article includes a menu based script, which was created to simplify the exaction and the use of the PowerShell commands. In the bottom of the article you can find a link for downloading the script.

Tips and information about PowerShell in the article

Copy and Edit PowerShell commands

The preferred option is to copy and paste PowerShell command sample, into a text editor such as Notepad. By using text editor we can:

  1. Adjust the PowerShell code for our specific needs.
    For example replace Variable names with a name of user from our organization.
  2. “Clean” unwanted characters.
    When we copy the PowerShell code, the code could include “unwanted” characters such as format characters (that could be appeared when we copy the code from another format such as: HTML), or space characters. We need to remove unwanted space charters because each power shell “Sentence” should be pasted as a “complete line.” In case that the power shell “Sentence” includes unnecessary spaces, the PowerShell console interrupts each space as a “New line,” and the PowerShell command will not be executed as it was expected.
Bulk Mode

Some of the PowerShell samples include “Bulk Mode Commands.” The meaning is that this command could influence: one User/Mailbox, or 10,000 Users/Mailboxes.
So……. Please examine this command carefully, and be sure that you understand the consequences.

PowerShell command logic

If you want to get more information about PowerShell commands concepts, expand the following section:


PowerShell commands relate to “Objects”. An example for object could be: User, Mailbox, Group etc.
PowerShell Object

Object identity

When we want to address object, we use the Object identity. Each object has a couple of “Identities.”
For example, we can address user object by using the: User name, User Display name, User email address and so on. When we use the User display name, we should use Quotation marks around the User display name, because it includes spaces. For example: “John Dow.”
PowerShell Object Identity

PowerShell command syntax

The format of the PowerShell command is similar to a “Human sentence”.

For example, the “meaning” of the command Get-Mailbox is: display a list of all existing Mailbox’s.
If we want to get information about specific Mailbox, we can use the command:
Get-Mailbox –identity John (display information about John Mailbox).

The first part in the PowerShell command is the “Action” such as: Get (display or bring object),
Remove (Delete Object),Set (configure properties of object) and so on.

The second part of the command is the object which we are referring.
For example: User, Mailbox, Group etc..
PowerShell Command Syntax

Now it’s Your Turn!
We really want to know what you think about the article

Related Post

Please rate this

Eyal Doron on EmailEyal Doron on FacebookEyal Doron on GoogleEyal Doron on LinkedinEyal Doron on PinterestEyal Doron on RssEyal Doron on TwitterEyal Doron on WordpressEyal Doron on Youtube
Eyal Doron

Share your knowledge.

It’s a way to achieve immortality.

Dalai Lama

2 Responses to “Office 365 PowerShell – Help and additional information”

  1. Fantastic job mate. Following your site for everything I need for Office 365. Keep it up 🙂

  2. Hey there outstanding website! Does running a blog similar to
    this require a lot of work? I have absolutely no expertise in coding but I was hoping to start my own blog soon. Anyway,
    should you have any recommendations or techniques for new blog owners
    please share. I understand this is off topic however I just wanted to ask.
    Appreciate it!

Leave a Reply

Your email address will not be published. Required fields are marked *