Hello Spiceheads,
I've made an employee termination powershell script that automates a great deal of our workflow for departing employees. I want to add more features to it, so I'm working on having the script auto remove office 365 licenses. I have been able to use this powershell code to remove all licenses from users (thanks Neally)
Powershell
functionremoveLicenses{(get-MsolUser-UserPrincipalName$termUPN).licenses.AccountSkuId|foreach{Set-MsolUserLicense-UserPrincipalName$termUPN-RemoveLicenses$_}}
This code works great, however I still have licenses in my account. Does anybody know a powershell command to lower the number of licenses (as is displayed inGet-MsolAccountSku) I've also attached a picture of the admin console view online.
Basically, I want to have it remove the license so that purchased licenses is equal...