New-MgmtGraphGroupExtension
MgmtGraph: Creates a new open extension on a group
#Requires -Version 5.1
#Requires -Modules Microsoft.Graph.Groups
[CmdletBinding()]
Param (
[Parameter(Mandatory = $true, Position = 0)]
[string]$GroupId,
[Parameter(Mandatory = $true, Position = 1)]
[string]$Id
)
Process {
try {
$params = @{
'GroupId' = $GroupId
'Id' = $Id
'Confirm' = $false
'ErrorAction' = 'Stop'
}
$ext = New-MgGroupExtension @params
$result = [PSCustomObject]@{
GroupId = $GroupId
ExtensionId = $ext.Id
Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
}
Write-Output $result
}
catch {
throw
}
}The unique identifier of the Microsoft Graph group.
The unique identifier (name) of the open extension.