1 60 61 | # Formatting using : http://hilite.me/ # Run this script in PowerShell ISE 64 bit #Use Global Admin credential while prompts. Set-ExecutionPolicy unrestricted Install-Module MSOnline Import-Module MSOnline $AzureAdCred = Get-Credential Connect-MsolService -Credential $AzureAdCred Connect-AzureAD -Credential $AzureAdCred $Datetime= Get-Date -Format dd_MM_yyyy_HH.mm.ss $LogFileName=([string]::Concat("C:\Temp\Output_O365-E3License-Users_Without_SharePoint-Activated " , $Datetime ,".csv")) New-Item $LogFileName -ItemType file Add-Content $LogFileName -Value ([string]::Concat("User Name" +","+ "User Prinicpal Name" +","+ "Usage Location")) $users = Get-MsolUser -all | Where isLicensed -EQ $true $intFlag =0 Foreach ($user in $users) { $intFlag = 0 $assignedplans = (Get-AzureADuser -ObjectId $user.UserPrincipalName).assignedplans foreach ($assignedplan in $assignedplans) { #Write-Host "$($assignedplan.service) "-ForegroundColor White
|
Monday, September 2, 2019
How to find the users in Office 365 E3 License with "Forms" activated
Subscribe to:
Post Comments (Atom)
HTML
Script:
No comments:
Post a Comment