0

PowerShell Quotes – To Expand Or Not Expand, That Is The Question

Abraham Lincoln made the famous quote that it is impossible to verify the accuracy of information on the Internet.  Well, OK he didn't but it was a semi-funny intro on the subject  of quotes…..

There are two different types quotes that we can use in PowerShell.:

  • Single quotes  -->     ‘
  • Double quotes –>      &ldq
Read the rest “PowerShell Quotes – To Expand Or Not Expand, That Is The Question”
0

Remove Multiple Management Role Entries In Office 365

Exchange Online in Office 365 has a very similar RBAC implementation to the on-premises installations of Exchange.  After previously bumping to an issue with Exchange Online (EXO), and then twice again in the last fortnight this bubbled to the top of the publishing pile.

In this environment, a custom Management Role was created called Level1-HelpDesk.  This is a copy from the Mail Recipients built-… Read the rest “Remove Multiple Management Role Entries In Office 365”

1

Using Exchange PowerShell Remoting With Integrated Scripting Environment–ISE

One item that is very prevalent is people directly loading the Exchange PowerShell snapin into the Integrated Scripting Environment (ISE).  This is not supported from the Exchange point of view, as Exchange requires that Remote PowerShell  be used with Exchange 2010 and 2013.

Let’s look at how this should be done.

 

Choosing The Correct Profile

As discussed in the previous post on Read the rest “Using Exchange PowerShell Remoting With Integrated Scripting Environment–ISE”

0

Creating PowerShell Profile For Integrated Scripting Environment – ISE

PowerShell Profile For Integrated Scripting Environment

In this post we will look at some of the mechanics behind creating a profile file which will customise the start-up behaviour of the Integrated Scripting Environment (ISE).  This will also serve as a precursor to additional posts on tweaking ISE for Exchange purposes.  The catalyst for writing this was twofold.  Firstly, an administrator was having issues trying to get ISE to process a profile scr… Read the rest “Creating PowerShell Profile For Integrated Scripting Environment – ISE”

1

PowerShell Script To Get Exchange 2010 Active CAS Connections

Purpose of this script is to report on  particular performance monitor counters for Outlook RPC Client Access, OWA and Exchange ActiveSync on multiple servers.  This was required as during the course of the year there have been a few issues where the third party load balancer device was not really doing equitable load balancing.  In some cases 60% of the user load of 50,000 mailboxes was directed … Read the rest “PowerShell Script To Get Exchange 2010 Active CAS Connections”

1

Set AdminSessionADSettings ViewEntireForest To True By Default

In Exchange 2010 the Set-AdServerSettings  cmdlet is used to manage the AD environment in the current Exchange Management Shell (EMS) session.  In Exchange 2007 there was a variable called AdminSessionADSettings  for the same purpose.  Exchange admins normally use the Set-AdServerSettings cmdlet to change a session’s view scope, so that they can see objects in multip… Read the rest “Set AdminSessionADSettings ViewEntireForest To True By Default”

0

PowerShell Input Output Escapades

After using various types, architectures and generations of computers over the years there is always the habit of “you go to what you know!”  In other words once you figure out a solution to an issue, you then use that repeatedly in the future as you know the process/steps involved.  This adroitly describes me when it comes to doing certain command line tasks.  If I were being a bit… Read the rest “PowerShell Input Output Escapades”

0

How To Rename DAG Network Using PowerShell

Rename DAG Network

Quick post for a Friday!

A customer had an “interesting” issue where the DAG networks were not being displayed inside the Exchange Management Console.  The underlying reason is because the implemented firewalls between Exchange servers, and then restricted network traffic between Exchange and the DCs.  This is not a supported situation.  For details on the firewall restricting traffic aspect please… Read the rest “How To Rename DAG Network Using PowerShell”

1

Retrieving Packets Received Discarded Perfmon Counter From Multiple Servers

Whilst working on a customer’s Exchange 2010 DAG issue, I wrote a quick script to quickly grab some performance monitor counters from all of their Exchange servers.  The issue that we were investigating was related to discarded packets when the VM was running on a certain hypervisor host.  The customer had moved their Exchange VMs to a new host and after doing so they were experiencing cluster iss… Read the rest “Retrieving Packets Received Discarded Perfmon Counter From Multiple Servers”

0

PowerShell Pipeline Perversion

Every so often I see folks run into issues with scripts/one-liners that they obtained from a blog or crafted themselves.  One common issue is when they think the command is perfect and then when they go to dump the output to a file, the content is mince**

Imagine your surprise when you open up the output file expecting pristine data, and it starts with:

#TYPE Microsoft.PowerShell.Commands.Interna

Read the rest “PowerShell Pipeline Perversion”