New-MgEducationClassModuleResource
Create a resource in a module. Only teachers can perform this operation. You can create the following types of module resources: Every resource has an @odata.type property to indicate which type of resource is being created.
Note
To view the beta release of this cmdlet, view New-MgBetaEducationClassModuleResource
Syntax
CreateExpanded (Default)
New-MgEducationClassModuleResource
-EducationClassId <string>
-EducationModuleId <string>
[-ResponseHeadersVariable <string>]
[-AdditionalProperties <hashtable>]
[-Id <string>]
[-Resource <IMicrosoftGraphEducationResource>]
[-Break]
[-Headers <IDictionary>]
[-HttpPipelineAppend <SendAsyncStep[]>]
[-HttpPipelinePrepend <SendAsyncStep[]>]
[-Proxy <uri>]
[-ProxyCredential <pscredential>]
[-ProxyUseDefaultCredentials]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Create
New-MgEducationClassModuleResource
-EducationClassId <string>
-EducationModuleId <string>
-BodyParameter <IMicrosoftGraphEducationModuleResource>
[-ResponseHeadersVariable <string>]
[-Break]
[-Headers <IDictionary>]
[-HttpPipelineAppend <SendAsyncStep[]>]
[-HttpPipelinePrepend <SendAsyncStep[]>]
[-Proxy <uri>]
[-ProxyCredential <pscredential>]
[-ProxyUseDefaultCredentials]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentityExpanded
New-MgEducationClassModuleResource
-InputObject <IEducationIdentity>
[-ResponseHeadersVariable <string>]
[-AdditionalProperties <hashtable>]
[-Id <string>]
[-Resource <IMicrosoftGraphEducationResource>]
[-Break]
[-Headers <IDictionary>]
[-HttpPipelineAppend <SendAsyncStep[]>]
[-HttpPipelinePrepend <SendAsyncStep[]>]
[-Proxy <uri>]
[-ProxyCredential <pscredential>]
[-ProxyUseDefaultCredentials]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
CreateViaIdentity
New-MgEducationClassModuleResource
-InputObject <IEducationIdentity>
-BodyParameter <IMicrosoftGraphEducationModuleResource>
[-ResponseHeadersVariable <string>]
[-Break]
[-Headers <IDictionary>]
[-HttpPipelineAppend <SendAsyncStep[]>]
[-HttpPipelinePrepend <SendAsyncStep[]>]
[-Proxy <uri>]
[-ProxyCredential <pscredential>]
[-ProxyUseDefaultCredentials]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Create a resource in a module. Only teachers can perform this operation. You can create the following types of module resources: Every resource has an @odata.type property to indicate which type of resource is being created.
Permissions
| Permission type | Permissions (from least to most privileged) |
|---|---|
| Delegated (work or school account) | EduCurricula.ReadWrite, |
| Delegated (personal Microsoft account) | Not supported |
| Application | EduCurricula.ReadWrite.All, |
Examples
Example 1: Code snippet
Import-Module Microsoft.Graph.Education
$params = @{
resource = @{
"@odata.type" = "#microsoft.graph.educationLinkResource"
displayName = "Bing site"
link = "https://www.bing.com"
}
}
New-MgEducationClassModuleResource -EducationClassId $educationClassId -EducationModuleId $educationModuleId -BodyParameter $params
This example shows how to use the New-MgEducationClassModuleResource Cmdlet.
Example 2: Code snippet
Import-Module Microsoft.Graph.Education
$params = @{
resource = @{
"@odata.type" = "#microsoft.graph.educationWordResource"
displayName = "Word_file.docx"
file = @{
odataid = "https://graph.microsoft.com/v1.0/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F2UVvTgEnTKi0GO59dbCL/items/01VANVJQ3XYXSBRKMQM5GISQGPVO6BNO27"
}
}
}
New-MgEducationClassModuleResource -EducationClassId $educationClassId -EducationModuleId $educationModuleId -BodyParameter $params
This example shows how to use the New-MgEducationClassModuleResource Cmdlet.
Example 3: Code snippet
Import-Module Microsoft.Graph.Education
$params = @{
resource = @{
"@odata.type" = "#microsoft.graph.educationFileResource"
displayName = "csv_file.csv"
file = @{
odataid = "https://graph.microsoft.com/v1.0/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F2UVvTgEnTKi0GO59dbCL/items/01VANVJQ7A2QVVORGJNVBIC4LLM3XQ6UTS"
}
}
}
New-MgEducationClassModuleResource -EducationClassId $educationClassId -EducationModuleId $educationModuleId -BodyParameter $params
This example shows how to use the New-MgEducationClassModuleResource Cmdlet.
Example 4: Code snippet
Import-Module Microsoft.Graph.Education
$params = @{
resource = @{
"@odata.type" = "#microsoft.graph.educationExcelResource"
displayName = "test_excel_file.xlsx"
file = @{
odataid = "https://graph.microsoft.com/v1.0/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F2UVvTgEnTKi0GO59dbCL/items/01VANVJQ5DL55LC4M35VEZWBZFJCX5V4QO"
}
}
}
New-MgEducationClassModuleResource -EducationClassId $educationClassId -EducationModuleId $educationModuleId -BodyParameter $params
This example shows how to use the New-MgEducationClassModuleResource Cmdlet.
Example 5: Code snippet
Import-Module Microsoft.Graph.Education
$params = @{
resource = @{
"@odata.type" = "#microsoft.graph.educationPowerPointResource"
displayName = "ppt_file.pptx"
fileUrl = "https://graph.microsoft.com/v1.0/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F2UVvTgEnTKi0GO59dbCL/items/01VANVJQ2GE3EYXUX6NJEI6UWOKBM74MHA"
}
}
New-MgEducationClassModuleResource -EducationClassId $educationClassId -EducationModuleId $educationModuleId -BodyParameter $params
This example shows how to use the New-MgEducationClassModuleResource Cmdlet.
Example 6: Code snippet
Import-Module Microsoft.Graph.Education
$params = @{
resource = @{
"@odata.type" = "#microsoft.graph.educationMediaResource"
displayName = "ModulePicture.PNG"
fileUrl = "https://graph.microsoft.com/v1.0/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F2UVvTgEnTKi0GO59dbCL/items/01VANVJQ56XC3M4V7F5JEK3NLECZH4HWGP"
}
}
New-MgEducationClassModuleResource -EducationClassId $educationClassId -EducationModuleId $educationModuleId -BodyParameter $params
This example shows how to use the New-MgEducationClassModuleResource Cmdlet.
Example 7: Code snippet
Import-Module Microsoft.Graph.Education
$params = @{
resource = @{
"@odata.type" = "#microsoft.graph.educationChannelResource"
url = "https://graph.microsoft.com/v1.0/teams/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/channels/19:4gSkXJRlsCMnZvBzAcyXGdsGtcQV0AJWtfvQp_a6Fi81@thread.tacv2"
displayName = "General"
}
}
New-MgEducationClassModuleResource -EducationClassId $educationClassId -EducationModuleId $educationModuleId -BodyParameter $params
This example shows how to use the New-MgEducationClassModuleResource Cmdlet.
Example 8: Code snippet
Import-Module Microsoft.Graph.Education
$params = @{
resource = @{
"@odata.type" = "#microsoft.graph.educationLinkedAssignmentResource"
displayName = "2024-01-19T17_54_38_711Z"
url = "https://graph.microsoft.com/v1.0/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/assignments/b6a1d277-fed7-4345-940e-3f2ce13eb737"
}
}
New-MgEducationClassModuleResource -EducationClassId $educationClassId -EducationModuleId $educationModuleId -BodyParameter $params
This example shows how to use the New-MgEducationClassModuleResource Cmdlet.
Parameters
-AdditionalProperties
Additional Parameters
Parameter properties
| Type: | System.Collections.Hashtable |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CreateViaIdentityExpanded
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CreateExpanded
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-BodyParameter
educationModuleResource To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
Parameter properties
| Type: | Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEducationModuleResource |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CreateViaIdentity
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
Create
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Break
Wait for .NET debugger to attach
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-EducationClassId
The unique identifier of educationClass
Parameter properties
| Type: | System.String |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CreateExpanded
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
Create
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-EducationModuleId
The unique identifier of educationModule
Parameter properties
| Type: | System.String |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CreateExpanded
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
Create
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Headers
Optional headers that will be added to the request.
Parameter properties
| Type: | System.Collections.IDictionary |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-HttpPipelineAppend
SendAsync Pipeline Steps to be appended to the front of the pipeline
Parameter properties
| Type: | Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[] |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-HttpPipelinePrepend
SendAsync Pipeline Steps to be prepended to the front of the pipeline
Parameter properties
| Type: | Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[] |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Id
The unique identifier for an entity. Read-only.
Parameter properties
| Type: | System.String |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CreateViaIdentityExpanded
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CreateExpanded
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Parameter properties
| Type: | Microsoft.Graph.PowerShell.Models.IEducationIdentity |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CreateViaIdentityExpanded
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CreateViaIdentity
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Proxy
The URI for the proxy server to use
Parameter properties
| Type: | System.Uri |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ProxyCredential
Credentials for a proxy server to use for the remote call
Parameter properties
| Type: | System.Management.Automation.PSCredential |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ProxyUseDefaultCredentials
Use the default credentials for the proxy
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Resource
educationResource To construct, see NOTES section for RESOURCE properties and create a hash table.
Parameter properties
| Type: | Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEducationResource |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CreateViaIdentityExpanded
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CreateExpanded
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ResponseHeadersVariable
Optional Response Headers Variable.
Parameter properties
| Type: | System.String |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | RHV |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-WhatIf
Runs the command in a mode that only reports what would happen without performing the actions.
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Microsoft.Graph.PowerShell.Models.IEducationIdentity
{{ Fill in the Description }}
Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEducationModuleResource
{{ Fill in the Description }}
System.Collections.IDictionary
{{ Fill in the Description }}
Outputs
Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEducationModuleResource
{{ Fill in the Description }}
Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
BODYPARAMETER <IMicrosoftGraphEducationModuleResource>: educationModuleResource
[(Any) <Object>]: This indicates any property can be added to this object.
[Id <String>]: The unique identifier for an entity.
Read-only.
[Resource <IMicrosoftGraphEducationResource>]: educationResource
[(Any) <Object>]: This indicates any property can be added to this object.
[CreatedBy <IMicrosoftGraphIdentitySet>]: identitySet
[(Any) <Object>]: This indicates any property can be added to this object.
[Application <IMicrosoftGraphIdentity>]: identity
[(Any) <Object>]: This indicates any property can be added to this object.
[DisplayName <String>]: The display name of the identity.For drive items, the display name might not always be available or up to date.
For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
[Id <String>]: Unique identifier for the identity or actor.
For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
[Device <IMicrosoftGraphIdentity>]: identity
[User <IMicrosoftGraphIdentity>]: identity
[DisplayName <String>]: Display name of resource.
[LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
INPUTOBJECT <IEducationIdentity>: Identity Parameter
[EducationAssignmentId <String>]: The unique identifier of educationAssignment
[EducationAssignmentResourceId <String>]: The unique identifier of educationAssignmentResource
[EducationCategoryId <String>]: The unique identifier of educationCategory
[EducationClassId <String>]: The unique identifier of educationClass
[EducationGradingCategoryId <String>]: The unique identifier of educationGradingCategory
[EducationModuleId <String>]: The unique identifier of educationModule
[EducationModuleResourceId <String>]: The unique identifier of educationModuleResource
[EducationOutcomeId <String>]: The unique identifier of educationOutcome
[EducationRubricId <String>]: The unique identifier of educationRubric
[EducationSchoolId <String>]: The unique identifier of educationSchool
[EducationSubmissionId <String>]: The unique identifier of educationSubmission
[EducationSubmissionResourceId <String>]: The unique identifier of educationSubmissionResource
[EducationUserId <String>]: The unique identifier of educationUser
[ReadingAssignmentSubmissionId <String>]: The unique identifier of readingAssignmentSubmission
[ReflectCheckInResponseId <String>]: The unique identifier of reflectCheckInResponse
RESOURCE <IMicrosoftGraphEducationResource>: educationResource
[(Any) <Object>]: This indicates any property can be added to this object.
[CreatedBy <IMicrosoftGraphIdentitySet>]: identitySet
[(Any) <Object>]: This indicates any property can be added to this object.
[Application <IMicrosoftGraphIdentity>]: identity
[(Any) <Object>]: This indicates any property can be added to this object.
[DisplayName <String>]: The display name of the identity.For drive items, the display name might not always be available or up to date.
For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
[Id <String>]: Unique identifier for the identity or actor.
For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
[Device <IMicrosoftGraphIdentity>]: identity
[User <IMicrosoftGraphIdentity>]: identity
[DisplayName <String>]: Display name of resource.
[LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet