Skip to content

Latest commit

 

History

History
102 lines (74 loc) · 3.16 KB

README_Licenses.md

File metadata and controls

102 lines (74 loc) · 3.16 KB

About The Project

Project Owner: Jannos-443

PRTG Powershell Script to monitor Microsoft 365 license usage

Free and open source: MIT License

Features

  • Microsoft 365 License usage
  • Last Azure AD Sync
  • Group Based Licensing Error

Changelog

V1.0

  • Added FriendlyName Feature
  • Added Ability to use HTTP Push to avoid local Permission on critical Remote Servers (Backup etc.)

V1.01

  • fixed free license count (issue #6)

HOW TO

  1. Place PRTG-M365-Licenses.ps1 under C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML

  2. Create AzureAD App

    • Open Azure AD
    • Register new APP
    • Overview >> Get Application ID
    • Set API Permissions >> MS Graph >> Application >>
      • Organization.Read.All
      • Group.Read.All
    • Certificates & secrets >> new Secret or follow this Guide: Paessler M365 Credentials
  3. Create new Sensor

    • EXE/Script Advanced = PRTG-M365-Licenses.ps1
    • Parameter = -ApplicationID 'Test-APPID' -TenantID 'YourTenantID' -AccessSecret 'Test-AppSecret' -SKUPattern '^(Enterprisepack|EMS|ATP_ENTERPRISE)$'
  4. Set your own Channel limits if needed

Usage

Show all Lics with at least 1 License

-ApplicationID 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -TenantID 'YourTenantID' -AccessSecret 'YourSecretKey'

Include Enterprisepack, EMS, ATP, VISIO, PROJECT and DYNAMICS Licenses

... -IncludeSKU '(Enterprisepack|EMS|ATP_ENTERPRISE|VISIOCLIENT|PROJECTPROFESSIONAL|DYN365_ENTERPRISE_SALES|DYN365_TEAM_MEMBERS|D365_CUSTOMER_SERVICE_ENT_ATTACH)'

Include only "O365 E3" (Enterprisepack) and "EMS" (EMS)

... -IncludeSKU '^(Enterprisepack|EMS|ATP_ENTERPRISE)$'

Include all but "O365 E3" (Enterprisepack) and "EMS" (EMS)

... -ExcludeSKU '^(Enterprisepack|EMS|ATP_ENTERPRISE)$' -exclude

Use FriendlyNames for ChannelNames

-ApplicationID 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -TenantID 'YourTenantID' -AccessSecret 'YourSecretKey' -FriendlyName

Include only "Office 365 E3"

... -FriendlyName -IncludeName '^(Office 365 E3)$'

Exclude "Office 365 E3"

... -FriendlyName -ExcludeName '^(Office 365 E3)$'

Examples

PRTG-M365

PRTG-M365

PRTG-M365

License translation


For more information about the different SKUs, visit Microsoft Docs. String ID for SKU (IncludeSKU) Product name for Name (IncludeName)

Includes/Excludes

You can use the variables to exclude/include The variables take a regular expression as input to provide maximum flexibility.

For more information about regular expressions in PowerShell, visit Microsoft Docs.

".+" is one or more charakters ".*" is zero or more charakters