Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Hi Marcus,
Have you managed those licenses successfully?
Regards,
Fraser
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I am trying to remove some licenses from a list of users I have and I have tried to use a the script posted here: https://technet.microsoft.com/en-us/library/dn771774.aspx to achieve this.
When I run the script it return the error: Set-MsolUserLicense : Cannot bind argument to parameter 'UserPrincipalName' because it is null.
At line:1 char:90
Below is a copy of the script I am running from a remote PowerShell session on my computer: Get-Content "C:\Scripts\UserLicensesRemove.txt" | Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -RemoveLicenses "XXXXXXX:ENTERPRISEPACK"
[Personal information removed by MSFT]
Please can you tell me where I am going wrong? Thanks.
Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Hi Marcus,
Have you managed those licenses successfully?
Regards,
Fraser
Hi Marcus,
You can try this existing PowerShell scripts that wrote by other user to bulk manage your end users’ license: Office 365 License Reporting and Management Tool.
It’s easy to use and have a simple window to allow you to perform your management.
Note: Microsoft .Net 4.5 framework and Azure ActiveDirectory Module for Windows Powershell are the pre-requisites of using this module.
If you don’t want to use this tool, since this issue may related to CSV file, so, could you share the file with us? I’ve sent you a private message for it. You can access your private message via https://answers.microsoft.com/en-us/privatemessages/list.
Regards
Fraser