Office 365 . Powershell
Admin Center vs. PowerShell: 6 Reasons Why You Need to Use PowerShell
Nicolas Bouchard

Admin Center vs. PowerShell: 6 Reasons Why You Need to Use PowerShell

Managing tenants more efficiently is key to any form of IT service management. This is why applications like Office 365 Admin Center and PowerShell exist.

Office 365 Admin Center is the web portal from which you, as an administrator, can manage user accounts and settings for each of the Office 365 services. This interface helps you perform all of your basic administration.

PowerShell is a command-line environment that’s designed specifically for system administration. PowerShell helps you control and automate the administration of the Windows operating system, server applications, and cloud-based services such as Office 365.

What’s the difference between them, then? Office 365 Admin Center is designed to help you manage user accounts, groups, domains, and licenses, as well as server products like Skype for Business, Exchange Online, and SharePoint Online. Office 365 PowerShell can save you significant time and effort by managing these tasks and server products more quickly. For example, you can get a list of all mailboxes using the Admin Center, but can’t count the number of items in all of the lists, for all of the sites, for all of your web apps. For that, you will need to use PowerShell.

Here are six important reasons to use Office 365 PowerShell instead of Admin Center for Office 365 management.

 

Are you managing multiple Office 365 tenants? If yes, read our guide, 15 Tricks to Succeed in Managing Multiple Office 365 Tenants to help you save time. Click here to learn how.

 

6 Reasons Why You Need to Use PowerShell instead of Admin Center

1) Detailed Information

The Admin Center displays useful information like Display Name, User Name, and Status for users, but that doesn’t mean that it displays all of the possible information that is stored on SharePoint sites, in Exchange Online mailboxes, and for users and licenses. We can take the example of Active Users in the Office 365 Admin Center. Here only Display Name, User Name, and Status for users are displayed.

Detailed Information

 

If you need more information about all of these users, such as Department and Country or region, you can use the Office 365 Admin Center to determine this information with the following steps:

  1. Double-click the user’s Display Name.
  2. In the user properties display Name pane, click Edit.
  3. Scroll down until you see the heading Department, Country or region, etc.

More Detailed Information

 

You must repeat this procedure for each user, which can become tedious if you have a large number of users. But with just one PowerShell command you can display this information for all of your users. The command is:

Get-MsolUser | Select-Object DisplayName, UsageLocation, Department

The output of the above command will be:

Detailed Information PowerShell

Similarly, with the help of Office 365 PowerShell, you can further manipulate the information obtained from the Get-MSolUser cmdlet. Suppose you need to sort these users by their department, grouping all the ICT users together, HR users together, etc.

Here is the command to use:

Get-MsolUser | Select-Object DisplayName, Department | Sort-Object Department, DisplayName

More Detailed Information PowerShell

 

2) Additional Features and Configurations

Another reason to use PowerShell instead of Admin Center is that it provides additional features and configurations. Admin Center is intended to provide access to the most common administrative tasks, while there are some tasks that can only be completed by using the Office 365 PowerShell. For example, Office 365 Skype for Business Online Admin center provides a few options for creating custom meeting invitations:

Additional Features and Configurations

You may need to configure additional options for Lync meeting participants, like how users join the meeting, who is allowed to record the meeting, or which users are presented by default. By default, Office 365 Skype for Business meetings allow:

  • Anonymous users to gain automatic access to meetings.
  • Attendees to record the meetings.
  • All users from your organization to be designated as presenters when they join meetings.

Additional Features and Configurations PowerShell

These settings are not available from the Office 365 Skype for Business Admin Center. However, you can control them using Office 365 PowerShell. The command to disable all these settings is:

Set-CsMeetingConfiguration -AdmitAnonymousUsersByDefault $False -AllowConferenceRecording $False -DesignateAsPresenter “None”

This is just one example. There are lots of other commands and scripts that provide additional features and configurations using PowerShell.

 

3) Bulk Operations and Sorting

As stated earlier, Office 365 Admin Center is useful only when you have a single operation to perform. For example, if you need to enable or disable one user account, you can use the Admin Center to quickly perform this operation. However, if you need to change many things, then Office 365 Admin Center might not be useful. For example, if you have several hundred SharePoint Online sites and you need to remove a specific user, say Michael Johnson, from all of them, in Admin Center you would need to perform this procedure for each site:

  1. Click on the URL of the site.
  2. In the site collection properties box, click the Web Site Address URL to open the site.
  3. On the site, click on the Share.
  4. In the Share dialog box, click the URL that shows all the users with permissions on the site.Bulk Operations and Sorting
  5. In the Shared With dialog box, click on Advanced.
  6. Scroll down to the list of all users, find and select Michael Johnson, and then click on Remove User Permissions.

It takes a very long time to perform this procedure on several hundred sites using Office 365 Admin Center. A better solution is to use Office 365 PowerShell, which is great at carrying out bulk operations. The PowerShell command to remove Michael Johnson from all of your sites is:

Get-SPOSite | ForEach-Object {Remove-SPOUser -Site $_.Url -LoginName “mjohnson@litwareinc.com”}
This command will take a few minutes to run against hundreds of sites and will remove Michael Johnson quickly, rather than taking hours of your time working through the Office 365 Admin Center.

 

4) Additional Ways to Filter Information

One of the advantages of using PowerShell in Office 365 is that it is great at filtering data. For example, to filter the list of mailboxes for all the users who live in the city of Bloomington:

Additional Ways to Filter Information

With the help of Office 365 Admin center, you can also combine filtering criteria with a condition, with the help of which you can find the mailboxes for all the people who live in Bloomington and who work in the ICT department.

However, there are some limitations to what you can do in the Office 365 Admin Center. For example, you may need to find all the mailboxes of people who do not live in Bloomington. This type of filtering is not supported in Office 365 Admin Center but can be done using Office 365 PowerShell.

This Office 365 PowerShell command will list all the mailboxes for the people who live anywhere except Bloomington:

Get-User | Where-Object {$_.RecipientTypeDetails -eq “UserMailbox” -and $_.City -ne “Bloomington”} | Select DisplayName, City

The output of the command will be something like:

Additional Ways to Filter Information

 

5) Saving Data and Printing

Another advantage of using Office 365 PowerShell is that it makes it easy to print or save data exactly to your requirements. The Office 365 Admin Center allows you to view data in the form of lists. For example, the snapshot below shows Skype for Business Online Admin center displaying a list of all users who have been enabled for Office 365 Skype for Business:

Saving Data and Printing

Now if you need to save the same data to a file, you must first copy all the information and then save it into an Excel sheet with the extra effort of proper formatting and correct settings. Additionally, the Admin Center does not provide a way to directly print all of the displayed lists. But with the help of Office 365 PowerShell you can easily display the list as well as save all the data into Excel as a comma-separated value (CSV) file:

Get-CsOnlineUser | Select-Object DisplayName, UserPrincipalName, UsageLocation | Export-Csv -Path “C:\Data\SFBUsers.csv” -NoTypeInformation

The output of the command will be something like:

More Saving Data and Printing

You can also send the output of an Office 365 PowerShell command that displays a list directly to the default printer in Windows. Here is an example command:

Get-CsOnlineUser | Select-Object DisplayName, UserPrincipalName, UsageLocation | Out-Printer

The printed document will have the same formatting as that displayed within the Office 365 PowerShell window.

 

6) Cross-Product Management in Office 365

Another great advantage of using PowerShell instead of Admin Center in Office 365 is that it allows you to manage different server products, like Exchange Online, SharePoint Online, and Skype For Business Online. We already know that the different components in Microsoft Office 365 are designed to work together. For example, when you create a new user in Office 365, you specify the user’s department, phone number, country or region, etc. This information will then also be available in other Office 365 server products, like Exchange Online, SharePoint Online, and Skype for Business Online.

However, product-specific information is typically not available across the different Office 365 products. If you need to know if a particular user’s mailbox is enabled or not, that information is available only in the Office 365 Exchange Admin Center, not in the Skype for Business Online Admin Center.

Let’s suppose that you need to make a report that shows the following information for all your users:

  • Display name
  • Whether the user is licensed for Office 365 or not
  • Whether the user’s Exchange mailbox has been enabled or not
  • Whether the user is enabled for Skype for Business or not

Office 365 Admin Center cannot produce such a report. You can manually create a separate document to store the information of all users’ display names and licensing information from the Office 365 Admin Center, get mailbox information from the Office 365 Exchange Admin Center, and get Skype for Business information from the Skype for Business Online Admin Center, and then collate and combine that information. But this will be a time-consuming task.

The alternative way to gather this information is to use an Office 365 PowerShell script. Although the script is complicated, it shows the potential of using Office 365 PowerShell to create views of information that are very difficult to obtain otherwise. The script that will compile and display the needed list is:

$x = Get-MsolUser
foreach ($i in $x)
{
$y = Get-Mailbox -Identity $i.UserPrincipalName
$i | Add-Member -MemberType NoteProperty -Name IsMailboxEnabled -Value $y.IsMailboxEnabled
$y = Get-CsOnlineUser -Identity $i.UserPrincipalName
$i | Add-Member -MemberType NoteProperty -Name EnabledForSfB -Value $y.Enabled
}
$x | Select-Object DisplayName, IsLicensed, IsMailboxEnabled, EnabledforSfB

The output of the script will be as follows:

Product Management in Office 365

 

Simplicity, Productivity, and Speed

Office 365 PowerShell has many advantages in simplicity, productivity, speed, and, in some cases, capability over the Office 365 Admin Center. It is designed to augment and enhance your ability to manage Office 365. As an Office 365 admin, you must be comfortable with using Office 365 PowerShell, because there are some configuration procedures that can only be done with PowerShell.

 

Office 365 Admin Guide Blog CTA

  • twitter
  • linkedin
  • facebook
  • google
  • 0

TAGS / KEYWORDS

Nicolas Bouchard

About Nicolas Bouchard

Nicolas is a Business Development Specialist at SherWeb. He has worked his way up through SherWeb, starting in Technical Support (level 2) before switching to Sales. He is now in the Business Development team, and his knowledge of Office 365 is extensive. With his broad expertise in cloud computing and service management, he’s an integral part of the SherWeb team.

Discussion

So, you're ready to deploy O365 using Remote Desktop

Fill out this small form so we can get in touch

Thank you for your interest! We’ll contact you soon.