Home > Office 365, Windows Client > Exporting a list of unlicensed users Office 365 to a CSV file

Exporting a list of unlicensed users Office 365 to a CSV file


#Exporting a list of unlicensed users to a CSV file.

#This first command will import the Azure Active Directory module into your PowerShell session.
Import-Module MSOnline

#Capture administrative credential for future connections.
$credential = get-credential

#Establishes Online Services connection to Azure Active Directory  
Connect-MsolService -Credential $credential

#Create a CSV export file of unlicensed users for your review. 
Get-MsolUser -UnlicensedUsersOnly | export-csv c:\reports\Unlicensed_Users.CSV
Advertisements
Categories: Office 365, Windows Client
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: