Following Office 365 helper script to find users with specific license pack, helps you list users with a specific license pack. You need to replace the tenant:licensepack in the script with the actual SKU in your tenant.

Before Executing the script, please connect to Microsoft Online PowerShell, instructions provided here

#Create a file on user’s desktop with current date and time

$filepath=”c:\licenses_{0:yyyyMMdd-HHmm}.csv”

$outFile=$filepath -f (Get-Date)

#Write files to disk

Out-File -FilePath $outFile -InputObject $header

#Following Cmdlet help you find the names of Licence pack already subscribed by your tenant

Get-MsolAccountSku

#Set a variable with the license pack you want to find

$accountSKU = “tenant:licensepack”

#Get users

$userList = Get-MsolUser -all

foreach ($i in $userList){

if ($i.Licenses.AccountSkuID -like $accountSKU )

{

Out-File -FilePath $outFileLicensed -Append -NoClobber -InputObject $lineOut

Write-Host $i.UserPrincipalName ” is licensed with ” $accountSKU

}

}

For more scripts to make your work easier , keep following our blog. If you want to report a new issue or looking for solutions, please start a new thread on our forum

 

The following two tabs change content below.
An automobile enthusiast at heart and computer geek by profession, started my Career with MS in 2005.Left Jobs and started Pledge Technologies (the parent company to Grishbi) back in 2009.We have been providing IT consulting to various Small and Medium businesses across US and UK since then.Our company specialises in Microsoft Server technologies like AD, Exchange, the rest and with numerous Office 365 migrations under our belt, we quite an expert with that too. Whatever we learn in our day to day life, we share it back on Grishbi as a Thank for all the love and support our customers have given us.
%d bloggers like this: