-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af06206
commit a160fc0
Showing
1 changed file
with
21 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,61 @@ | ||
# AzureADLicensing | ||
|
||
PowerShell Cmdlets to manage Azure AD Group based licensing. | ||
PowerShell cmdlets to manage Azure AD group based licensing. Cmdlets use the internal Azure portal API which is not supported by Microsoft. | ||
|
||
[![PSGallery Version](https://img.shields.io/powershellgallery/v/AzureADLicensing.svg?style=flat-square&label=PSGallery%20Version)](https://www.powershellgallery.com/packages/AzureADLicensing) [![PSGallery Downloads](https://img.shields.io/powershellgallery/dt/AzureADLicensing?style=flat-square&label=PSGallery%20Downloads)](https://www.powershellgallery.com/packages/AzureADLicensing) | ||
|
||
## Using the module | ||
|
||
1. Install the module: ```Install-Module -Name AzureADLicensing -AllowClobber``` | ||
2. If you hav the deprecated AzureRM module installed, uninstall it first ```Uninstall-AzureRm``` | ||
3. Authenticate to Azure: ```Connect-AzAccount``` | ||
2. Authenticate to Azure: ```Connect-AzAccount``` | ||
|
||
## Available commands | ||
|
||
Get available licenses and services: | ||
|
||
<pre> | ||
```powershell | ||
Get-AADLicenseSku | ||
</pre> | ||
``` | ||
|
||
Get included service plans for a license: | ||
|
||
<pre> | ||
```powershell | ||
$m365= Get-AADLicenseSku | Where-Object {$_.name -match "Microsoft 365 E5"} | ||
$m365.serviceStatuses.servicePlan | ||
</pre> | ||
``` | ||
|
||
Add new license assignment: | ||
|
||
<pre> | ||
```powershell | ||
Add-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c" -accountSkuId "nicolasuter:FLOW_FREE" | ||
</pre> | ||
``` | ||
|
||
Add license assignmnet with disabled plan: | ||
|
||
<pre>Add-AADGroupLicenseAssignment -groupId 0a918505-d0d5-4078-9891-0e8bec67cb65 -accountSkuId "nicolasuter:SPE_E5" -disabledServicePlans @("MYANALYTICS_P2")</pre> | ||
```powershell | ||
Add-AADGroupLicenseAssignment -groupId 0a918505-d0d5-4078-9891-0e8bec67cb65 -accountSkuId "nicolasuter:SPE_E5" -disabledServicePlans @("MYANALYTICS_P2") | ||
``` | ||
|
||
Update license assignment: | ||
|
||
<pre>Update-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c" -accountSkuId "nicolasuter:FLOW_FREE"</pre> | ||
```powershell | ||
Update-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c" -accountSkuId "nicolasuter:FLOW_FREE" | ||
``` | ||
|
||
Remove license assignment: | ||
|
||
<pre>Remove-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c" -accountSkuId "nicolasuter:FLOW_FREE"</pre> | ||
```powershell | ||
Remove-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c" -accountSkuId "nicolasuter:FLOW_FREE" | ||
``` | ||
|
||
Get license assignments for a specific group: | ||
|
||
<pre> | ||
```powershell | ||
Get-AADGroupLicenseAssignment -groupId "a5e95316-1c03-44d7-afac-efd0e788122c" | ||
</pre> | ||
``` | ||
|
||
Get all group based licensing assignments: | ||
|
||
<pre> | ||
```powershell | ||
Get-AADGroupLicenseAssignment -All | ||
</pre> | ||
|
||
``` |