The PowerShell Project: Ready? Fight!

DISCLAIMER: This was originally a way to document what I was learning when I first ran into PowerShell as a student who had no prior scripting experience. The examples given and the posts done in relation to the project most likely do not follow best practices and should definitely be reviewed if they are going to be used in any fashion. You have been warned! 🙂

Why have I only posted basic, vague messages about PowerShell?

That’s because I barely know it myself, and didn’t necessarily know where to go first when it came to teaching it. I was able to walkthrough basic directory navigation and touch extremely lightly on the Active Directory cmdlets. Teach as I go. But guess what? Order has been restored! Err…or has been implemented for the first time since the blog began!

A Noobie’s Journey into Scripting 

:How it’s going to work:
Once every week, I am going to write-up a blog post on what I learned the week before with PowerShell. I will also throw up the scripts I end up writing in each post, and doubly-so to an awesome PowerShell Project page. In doing ANY tasks I wish to complete in PowerShell, from making a one-time backup to creating a new virtual machine, I won’t be able to complete the task unless I do it through the PowerShell CLI (or better yet, the ISE).

The project is definitely going to be more of a “learn with me” setup for newcomers to PowerShell CLI/scripting, so my scripts will easily be staring at you…waiting for improvements. Lacking options and functionality. Wishing for random members in a current ghost community to contribute and improve them.

With each weekly post, it will be an open-forum for others to give their opinion on what can be changed, improved, expanded, etc.

Sound awesome? I think so. The page has already been added, and the posts will start next week!


2 thoughts on “The PowerShell Project: Ready? Fight!

  1. Let me know if you want an article on this. But its a basic script to connect to Microsoft Online Services (MSOL).

    $ErrorActionPreference = “Stop”

    write-host “********************************” -foregroundcolor ‘yellow’
    write-host “** Copyright 2012 **” -foregroundcolor ‘yellow’
    write-host “** Written By: Andrew Jackson **” -foregroundcolor ‘yellow’
    write-host “********************************” -foregroundcolor ‘yellow’

    # ** Variables **

    # You can specify your user credentials on the line below
    $user = “”

    # This will pop-up a dialog and request your username and password. Username will already be filled if you have the above line completed.
    $cred = Get-Credential -Credential $user

    # Clarify MSOL Service to connect to
    $msoExchangeURL = “”

    # ** The real work **

    # Import the Local Microsoft Online PowerShell Module Cmdlets and Connect to Microsoft Online Services

    Import-Module MSOnline

    Connect-MsolService -Credential $cred

    # Establish an Remote PowerShell Session to Exchange Online

    $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $msoExchangeURL -Credential $cred -Authentication Basic -AllowRedirection

    Import-PSSession $session

    # You can now use the:
    # 1] MSOL Powershell cmdlets such as Get-MsolUser
    # 2] Exchange Online cmdlets such as Get-Mailbox
    # ** It is good to remove your Remote Exchange Online session when you are all done.
    # Remove-PsSession $session

    • I’m glad PowerShell is done in a fashion that I can read this and see you are capable of remotely administrating an Exchange server after running this…err, right? As for an article, I will see where the project takes me, as an article/script like this would be a cool add-on to a PowerShell article about remote-awesome

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s