New-MgPrintPrinterTaskTrigger
Create a new task trigger on the specified printer. Currently, only one task trigger can be specified per printer, but this limit might be removed in the future.
Note
To view the beta release of this cmdlet, view New-MgBetaPrintPrinterTaskTrigger
Syntax
New-MgPrintPrinterTaskTrigger
-PrinterId <String>
[-ResponseHeadersVariable <String>]
[-AdditionalProperties <Hashtable>]
[-Definition <IMicrosoftGraphPrintTaskDefinition>]
[-Event <String>]
[-Id <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-MgPrintPrinterTaskTrigger
-PrinterId <String>
-BodyParameter <IMicrosoftGraphPrintTaskTrigger>
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-MgPrintPrinterTaskTrigger
-InputObject <IDevicesCloudPrintIdentity>
[-ResponseHeadersVariable <String>]
[-AdditionalProperties <Hashtable>]
[-Definition <IMicrosoftGraphPrintTaskDefinition>]
[-Event <String>]
[-Id <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-MgPrintPrinterTaskTrigger
-InputObject <IDevicesCloudPrintIdentity>
-BodyParameter <IMicrosoftGraphPrintTaskTrigger>
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Create a new task trigger on the specified printer. Currently, only one task trigger can be specified per printer, but this limit might be removed in the future.
Permissions
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | Printer.ReadWrite.All | Printer.FullControl.All |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Not supported. | Not supported. |
Examples
Example 1: Code snippet
Import-Module Microsoft.Graph.Devices.CloudPrint
$params = @{
event = "jobStarted"
"definition@odata.bind" = "https://graph.microsoft.com/v1.0/print/taskDefinitions/{taskDefinitionId}"
}
New-MgPrintPrinterTaskTrigger -PrinterId $printerId -BodyParameter $params
This example shows how to use the New-MgPrintPrinterTaskTrigger Cmdlet.
Parameters
-AdditionalProperties
Additional Parameters
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BodyParameter
printTaskTrigger To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
Type: | IMicrosoftGraphPrintTaskTrigger |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Definition
printTaskDefinition To construct, see NOTES section for DEFINITION properties and create a hash table.
Type: | IMicrosoftGraphPrintTaskDefinition |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Event
printEvent
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Headers
Optional headers that will be added to the request.
Type: | IDictionary |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Id
The unique identifier for an entity. Read-only.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IDevicesCloudPrintIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PrinterId
The unique identifier of printer
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProgressAction
{{ Fill ProgressAction Description }}
Type: | ActionPreference |
Aliases: | proga |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResponseHeadersVariable
Optional Response Headers Variable.
Type: | String |
Aliases: | RHV |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.Graph.PowerShell.Models.IDevicesCloudPrintIdentity
Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPrintTaskTrigger
System.Collections.IDictionary
Outputs
Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPrintTaskTrigger
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 <IMicrosoftGraphPrintTaskTrigger>
: printTaskTrigger
[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[Definition <IMicrosoftGraphPrintTaskDefinition>]
: printTaskDefinition[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[CreatedBy <IMicrosoftGraphAppIdentity>]
: appIdentity[(Any) <Object>]
: This indicates any property can be added to this object.[AppId <String>]
: Refers to the unique ID representing application in Microsoft Entra ID.[DisplayName <String>]
: Refers to the application name displayed in the Microsoft Entra admin center.[ServicePrincipalId <String>]
: Refers to the unique ID for the service principal in Microsoft Entra ID.[ServicePrincipalName <String>]
: Refers to the Service Principal Name is the Application name in the tenant.
[DisplayName <String>]
: The name of the printTaskDefinition.[Tasks <IMicrosoftGraphPrintTask-
[]>]
: A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only.[Id <String>]
: The unique identifier for an entity. Read-only.[Definition <IMicrosoftGraphPrintTaskDefinition>]
: printTaskDefinition[ParentUrl <String>]
: The URL for the print entity that triggered this task. For example, https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs/{jobId}. Read-only.[Status <IMicrosoftGraphPrintTaskStatus>]
: printTaskStatus[(Any) <Object>]
: This indicates any property can be added to this object.[Description <String>]
: A human-readable description of the current processing state of the printTask.[State <String>]
: printTaskProcessingState
[Trigger <IMicrosoftGraphPrintTaskTrigger>]
: printTaskTrigger
[Event <String>]
: printEvent
DEFINITION <IMicrosoftGraphPrintTaskDefinition>
: printTaskDefinition
[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[CreatedBy <IMicrosoftGraphAppIdentity>]
: appIdentity[(Any) <Object>]
: This indicates any property can be added to this object.[AppId <String>]
: Refers to the unique ID representing application in Microsoft Entra ID.[DisplayName <String>]
: Refers to the application name displayed in the Microsoft Entra admin center.[ServicePrincipalId <String>]
: Refers to the unique ID for the service principal in Microsoft Entra ID.[ServicePrincipalName <String>]
: Refers to the Service Principal Name is the Application name in the tenant.
[DisplayName <String>]
: The name of the printTaskDefinition.[Tasks <IMicrosoftGraphPrintTask-
[]>]
: A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only.[Id <String>]
: The unique identifier for an entity. Read-only.[Definition <IMicrosoftGraphPrintTaskDefinition>]
: printTaskDefinition[ParentUrl <String>]
: The URL for the print entity that triggered this task. For example, https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs/{jobId}. Read-only.[Status <IMicrosoftGraphPrintTaskStatus>]
: printTaskStatus[(Any) <Object>]
: This indicates any property can be added to this object.[Description <String>]
: A human-readable description of the current processing state of the printTask.[State <String>]
: printTaskProcessingState
[Trigger <IMicrosoftGraphPrintTaskTrigger>]
: printTaskTrigger[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[Definition <IMicrosoftGraphPrintTaskDefinition>]
: printTaskDefinition[Event <String>]
: printEvent
INPUTOBJECT <IDevicesCloudPrintIdentity>
: Identity Parameter
[GroupId <String>]
: The unique identifier of group[PrintConnectorId <String>]
: The unique identifier of printConnector[PrintDocumentId <String>]
: The unique identifier of printDocument[PrintJobId <String>]
: The unique identifier of printJob[PrintOperationId <String>]
: The unique identifier of printOperation[PrintServiceEndpointId <String>]
: The unique identifier of printServiceEndpoint[PrintServiceId <String>]
: The unique identifier of printService[PrintTaskDefinitionId <String>]
: The unique identifier of printTaskDefinition[PrintTaskId <String>]
: The unique identifier of printTask[PrintTaskTriggerId <String>]
: The unique identifier of printTaskTrigger[PrinterId <String>]
: The unique identifier of printer[PrinterShareId <String>]
: The unique identifier of printerShare[UserId <String>]
: The unique identifier of user