Jump to content

Need a powershell script - provisioned licenses against users


Recommended Posts

Posted (edited)

If anyone has the time, i could do with a powershell script that checks each user in O365 for which products / licenses are assigned to all users and export it to a CSV.

 

Ive got a CSV that shows the license type but this isn't enough, i need it to show the products too with enabled / disabled.

 

i've also seen this https://blogs.technet.microsoft.com/cloudpfe/2013/12/27/how-to-tell-which-office-365-services-have-been-provisioned but dont know how to do it for all users.

 

EDIT:

 

I think ive found it:

 

$collections = @()

Get-MsolUser -All | ? {$_.isLicensed -eq $true} |%{

foreach($l in $_.Licenses.ServiceStatus)

{

$data = New-Object psObject -Property @{

ObjectID = $_.ObjectID

UPN = $_.UserPrincipalName

DisplayName = $_.

ServiceName = $l.ServicePlan.ServiceName

ServiceStatus = $l.ProvisioningStatus

}

$collections += $data

}

}

$collections | Export-Csv C:TempLicenseInformation.csv -NoTypeInformation

Edited by timbo343
Posted (edited)

Thanks for the link, ive seen and used that before. It was only on a trail basis, which has now run out and it only restricted me to edit 5 lines at a time. The one you've posted too is the same version - Trail version will expire in 14 days.

 

The script i posted worked for me in the end. I just had to filter some of the columns in excel to give me the results i required.

Edited by timbo343

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...