Get-ADobject Counts

Quick helpful PS to grab some AD DS info and dump to xlsx. Might come in handy down the road. Requires excel installed on workstation and winrm enabled on domain controller specified in same AD DS domain.

# Prompt end user for domain controller to use for AD DS queries (netbios name will suffice as long as on same domain)
$domaincontroller = Read-Host "Please specify the domain controller to use"

# Start remote PowerShell session with AD DS domain controller specified
Enter-PSSession -ComputerName $domaincontroller

# Create directory off of C: to store resulting xlsx file
New-Item C:\temp\ADDS_Export\ -ItemType Directory

# Declare variables and query AD DS for AD object counts
$aduser = (Get-ADUser -Filter * -ResultSetSize $null | Measure-Object).Count
$adcomputer = (Get-ADComputer -Filter {OperatingSystem -notlike "*Server*"} -ResultSetSize $null | Measure-Object).Count
$adserver = (Get-ADComputer -Filter {OperatingSystem -like "*Server*"} -ResultSetSize $null | Measure-Object).Count
$adgroup = (Get-ADGroup -Filter * -ResultSetSize $null | Measure-Object).Count

# Exit Remote PowerShell session

#Create new Excel object and populate data (requires Excel to be installed on workstation)
$objExcel = New-Object -ComObject Excel.Application
$objExcel.Visible = $false
$objExcel.SheetsInNewWorkbook = 1
$Workbook01 = $objExcel.Workbooks.Add()
$Worksheet01 = $Workbook01.Sheets.Item(1)
$row = 1
$column = 1
$Worksheet01.Cells.Item($row,$column)="User Count"
$column2 = 2
$Worksheet01.Cells.Item($row,$column2)="Computer Count"
$column3 = 3
$Worksheet01.Cells.Item($row,$column3)="Group Count"
$column4 = 4
$Worksheet01.Cells.Item($row,$column4)="Server Count"

Exchange 2013 – Database Availability Groups – Part 3

In this post, I am going to take a look at various different methods that we can add a mailbox database copy for an existing “DB01” database copy in Exchange 2013. Currently my setup consists of two mailbox servers running on Hyper-V 2012 (on Windows 8). The mailbox servers are running standard edition trial licenses of both Windows and Exchange and they are a member of a two node dag leveraging an Exchange 2013 Client Access server as the file share witness. For more information on the setup please refer back to the first article, here.


Exchange 2013 – Database Availability Groups – Part 2

In the first part of my explorations into Exchange 2013 and specifically, the setup and any new functionality of database availability groups,  I setup the network adapters on my Exchange 2013 mailbox servers to support the creation of a new database availability group. To review the settings thus far, please go here. Next we’ll take a look at how the dag creation process differs in the Exchange Admin Center in 2013 from its predecessor in 2010. Of course this can all be done directly in the shell but I’d like to explore the user experience in the new console personally for now.


Exchange 2013 – Database Availability Groups – Part 1

I’m calling this DAG 2.0 as this is the second release of Exchange that provides database availability groups for high availability of mailbox and now public folder data natively in the product.
In Exchange 2010, database availability groups were a significant shift as it relates to high availability for Exchange services and more directly mailbox data availability for our end users.

Configuring database availability groups in Exchange 2010 was not terribly difficulty as the Exchange team made it easy for administrators that may not be familiar with failover cluster services and the requirements that go along with it. After providing network information, ip addresses for the dag and members to be included, PowerShell did its magic under the hood and provisioned failover clustering for us if it was not already installed and configured on the mailbox servers.


Is Your Organization Prepared for the Wave?

The Office suite of products is one of, if not the most, widely used document creation and communication platforms on the desktop in the world. In fact, during the first year of availability, Office 2010 sold more than 100 million copies. Over 750 million users have a version of the Office suite in use on their desktop or laptop pc. As of June 2012, the internet usage statics site estimates that about 2.4 billion users are on the internet. With just over 7 billion people on our planet, that is about 34% of the humans on earth using the internet. If an estimated 750 million copies of Office are installed, that equates to about one third of the users on the internet. With that being said, think about how many copies of the Office suite are installed across the enterprise where Windows and Office have reigned supreme for so long!

With a new flood of social networking, cloud storage and the shift to BYOD, those 2.4 billion internet users are sharing information in ways that have never been done before. Things like SkyDrive, Dropbox and other cloud storage platforms make it very easy for consumers to save and share data in the cloud making it accessible to other users and various other personal devices very easily. Networking tools like Facebook, Twitter and LinkedIn are making it easier for people to find and connect with one another easier and faster than ever.

So how does the enterprise IT departments bring these, what seem to be now expected, methods of communication and collaboration to the corporate environment? Enter Wave15 or what may be better known as the 2013 release of the Office suite of products including: Exchange 2013, SharePoint 2013, Lync 2013 and Office 2013. The latest release of the suite brings many new features that are available to the internet population into the enterprise in a secure, stable, scalable, compliant and integrated solution. Coupled with the already largely installed desktop suite of Office in the new 2013 version, Wave15 promises to change collaboration and bring together the seasoned corporate professional who may be familiar with a few, or all, of the products and the new workforce of users who expect that these forms of communication and collaboration are available to them. Below are just a few of the new features that are available in the next “Wave” of the Office suite which is available today.

  • Site Mailboxes
  • SkyDrive Pro
  • Follow Me, Blogging, Communities and Profile enhancements
  • Unified Search
  • Unified eDiscovery
  • Apps for Office 2013 – including and integrated into SharePoint and Exchange 2013
  • Public instant message connectivity
  • Web conferencing with full audio and video support
  • Persistent or “group chat”
  • Unified user experience across multiple device types and browser experiences

What are your thoughts? Experiences? Complaints? Gripes?

Site Mailboxes in Exchange 2013 & SharePoint 2013 – Part 6

User Experience with Site Mailboxes in Exchange 2013 and SharePoint 2013

Part 1 started with installing the EWS API on the SharePoint 2013 WFE and Part 5 finished of the server side configuration with adding a site mailbox to a demo site in SharePoint 2013. In the final post, we’ll take a look at how two end user can leverage the features setup in the previous articles. For the sake of demonstration I have created two users that will be collaborating.

Amy Reynolds will be leveraging her Outlook client so we’ll start by launching Outlook 2013 which is a requirement for site mailboxes. On the Windows 8 device we’ll hit the Windows key to navigate to the start menu and select Outlook 2013 as shown below.


Site Mailboxes in Exchange 2013 & SharePoint 2013 – Part 5

Enabling Site Mailboxes App in SharePoint Site and Connecting to Outlook Profile

In the next post of the series, we’ll enable the site mailbox feature in a demo SharePoint site that two users are members of and are collaborating both via email and a document library in the demo site.

First a site collection administration will need to enable the site mailboxes app which is now available as shown below after select the settings cog in the top right corner of the site and selecting “Site Content


After navigating to the site contents section as a site collection administrator, click “Add an App


Site Mailboxes in Exchange 2013 & SharePoint 2013 – Part 4

Configuring SharePoint 2013 and Exchange 2013 to support Site Mailboxes

The next post in this multi-part series will outline the remaining steps required to prepare our environment for Site Mailboxes in Wave15.

Establish OAuth Trust and Service Permissions on SharePoint Server 2013

The next step is to copy the two scripts that are accessible here and save each as a .ps1 file to be executed. The first script should be named, “Set-SiteMailboxConfig.ps1″ and the second named, “Check-SiteMailboxConfig.ps1″. These files should be stored in the same directory on the web front end server as the first script will call and execute the second script. The second script, “Check-SiteMailboxConfig.ps1″ can also be run independently to validate the setup of site mailboxes in an existing environment.

The scripts will allow for the following:

  • Retrieve and install the Exchange metadata, giving the Exchange service principal full control permissions to the SharePoint site subscription
  • Enable the site mailbox feature in the SharePoint environment
  • (optional) Set the Exchange site mailbox target domain, if DNS for the domain has not been configured for AutoDiscover

Navigate to the location where the two powershell scripts have been stored (my example is c:scripts) and execute the following command to execute the scripts. Ensure that you launch the SharePoint shell as an administrator.

.Set-SiteMailboxConfig.ps1 -ExchangeSiteMailboxDomain <Domain> -ExchangeAutodiscoverDomain [Exchange Server] -WebApplicationUrl [URL]

For the sake of demo purposes, my screenshot has environment specific information removed. A sample cmdlet with optional parameters is shown below.

.Set-SiteMailboxConfig.ps1 -ExchangeSiteMailboxDomain -ExchangeAutodiscoverDomain -WebApplicationUrl


After executing the above command, I was presented with the error and explanation shown below.


After some certificate cleanup and ensuring that there were no self-signed certificates in use on either the Exchange or SharePoint server by leveraging the internal certificate authority, I was able to rerun the scripts and produce the following success results.


After successful execution of the above scripts on the SharePoint 2013, the below script must be executed on the Exchange 2013 server. The script is present in the scripts directory on Exchange located at C:Program FilesMicrosoftExchange Serverv15Scripts. A sample of executing this script with parameters is shown below. Ensure that <SP_FQDN> is replaced with the proper values for your environment.

.Configure-EnterprisePartnerApplication.ps1 -ApplicationType Sharepoint -AuthMetadataUrl https://<SP_FQDN>/_layouts/15/metadata/json/1

Part 5 will walk through enabling the site mailbox app on the SharePoint site that will be leveraged for demonstration purposes.

Site Mailboxes in Exchange 2013 & SharePoint 2013 – Part 3

Configuring the App Management Service Application on the SharePoint 2013 farm

In part 3 of this series, we will investigate the requirements and implementation procedures related to the app management service application which is a prerequisites for the new Site Mailboxes feature in SharePoint2013 and Exchange 2013. The process is quite simple and can be configured in Central Administration as shown in the below steps:

1. In Central Administration, in Application Management, select “Manage Service Applications


2. Click “New” and select “App Management Service“.


3. Populate the values as required in your organization with a name, application pool and any other required modifications. My configuration is shown below.


To summarize we need to create an new app management service application in SharePoint to support the Site Mailbox feature in Wave15. Part 4 will continue to walkthrough the configuration of SharePoint and Exchange 2013 to support Site Mailboxes.