docs: Update comments for new functions
This commit is contained in:
@@ -1,3 +1,31 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Retrieves user licenses and roles for administrative accounts from Microsoft 365 via the Graph API.
|
||||
.DESCRIPTION
|
||||
The Get-AdminRoleUserLicense function connects to Microsoft Graph and retrieves all users who are assigned administrative roles along with their user details and licenses. This function is useful for auditing and compliance checks to ensure that administrators have appropriate licenses and role assignments.
|
||||
.PARAMETER SkipGraphConnection
|
||||
A switch parameter that, when set, skips the connection to Microsoft Graph if already established. This is useful for batch processing or when used within scripts where multiple calls are made and the connection is managed externally.
|
||||
.EXAMPLE
|
||||
PS> Get-AdminRoleUserLicense
|
||||
|
||||
This example retrieves all administrative role users along with their licenses by connecting to Microsoft Graph using the default scopes.
|
||||
.EXAMPLE
|
||||
PS> Get-AdminRoleUserLicense -SkipGraphConnection
|
||||
|
||||
This example retrieves all administrative role users along with their licenses without attempting to connect to Microsoft Graph, assuming that the connection is already established.
|
||||
.INPUTS
|
||||
None. You cannot pipe objects to Get-AdminRoleUserLicense.
|
||||
.OUTPUTS
|
||||
PSCustomObject
|
||||
Returns a custom object for each user with administrative roles that includes the following properties: RoleName, UserName, UserPrincipalName, UserId, HybridUser, and Licenses.
|
||||
.NOTES
|
||||
Version: 1.0
|
||||
Author: Your Name
|
||||
Creation Date: 2024-04-15
|
||||
Purpose/Change: Initial function development to support Microsoft 365 administrative role auditing.
|
||||
.LINK
|
||||
https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Get-AdminRoleUserLicense
|
||||
#>
|
||||
function Get-AdminRoleUserLicense {
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
|
@@ -27,7 +27,7 @@
|
||||
- It is recommended to backup the Excel file before running this script to prevent accidental data loss.
|
||||
- This function is part of the CIS Excel and CSV Data Management Toolkit.
|
||||
.LINK
|
||||
Online documentation: [Your Documentation Link Here]
|
||||
https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Get-AdminRoleUserLicense
|
||||
#>
|
||||
|
||||
function Sync-CISExcelAndCsvData {
|
||||
|
Reference in New Issue
Block a user