Month: May 2016
![Harri Jaakkonen](https://i0.wp.com/www.cloudpartner.fi/wp-content/uploads/2021/09/harri_pic.jpg?fit=32%2C32&ssl=1)
Posted by Harri Jaakkonen Posted on 30/05/2016 0 Comments on Get all user lisences from Office 365 to csv.
Posted in Office 365, Powershell
Hi, Today I had to get a list from Office 365 with UserPrincipalName and MsolAccountSku. So here is the trick-script. $ReportPath = “c:userlist.csv” Add-Content -value (“UserPrincipalName”+”,”+”IsLicensed”+”,”+ “Licenses”) -Path $ReportPath $AllUsers = Get-MsolUser -All foreach ($User in $AllUsers) { $UserPrincipalName =…