Share via


Update-MgDeviceManagementAuditEvent

Update the properties of a auditEvent object.

Note

To view the beta release of this cmdlet, view Update-MgBetaDeviceManagementAuditEvent

Syntax

UpdateExpanded (Default)

Update-MgDeviceManagementAuditEvent
    -AuditEventId <string>
    [-ResponseHeadersVariable <string>]
    [-Activity <string>]
    [-ActivityDateTime <datetime>]
    [-ActivityOperationType <string>]
    [-ActivityResult <string>]
    [-ActivityType <string>]
    [-Actor <IMicrosoftGraphAuditActor>]
    [-AdditionalProperties <hashtable>]
    [-Category <string>]
    [-ComponentName <string>]
    [-CorrelationId <string>]
    [-DisplayName <string>]
    [-Id <string>]
    [-Resources <IMicrosoftGraphAuditResource[]>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Update

Update-MgDeviceManagementAuditEvent
    -AuditEventId <string>
    -BodyParameter <IMicrosoftGraphAuditEvent>
    [-ResponseHeadersVariable <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UpdateViaIdentityExpanded

Update-MgDeviceManagementAuditEvent
    -InputObject <IDeviceManagementAdministrationIdentity>
    [-ResponseHeadersVariable <string>]
    [-Activity <string>]
    [-ActivityDateTime <datetime>]
    [-ActivityOperationType <string>]
    [-ActivityResult <string>]
    [-ActivityType <string>]
    [-Actor <IMicrosoftGraphAuditActor>]
    [-AdditionalProperties <hashtable>]
    [-Category <string>]
    [-ComponentName <string>]
    [-CorrelationId <string>]
    [-DisplayName <string>]
    [-Id <string>]
    [-Resources <IMicrosoftGraphAuditResource[]>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

UpdateViaIdentity

Update-MgDeviceManagementAuditEvent
    -InputObject <IDeviceManagementAdministrationIdentity>
    -BodyParameter <IMicrosoftGraphAuditEvent>
    [-ResponseHeadersVariable <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Update the properties of a auditEvent object.

Permissions

Permission type Permissions (from least to most privileged)
Delegated (work or school account) DeviceManagementApps.ReadWrite.All,
Delegated (personal Microsoft account) Not supported
Application DeviceManagementApps.ReadWrite.All,

Examples

Example 1: Code snippet


Import-Module Microsoft.Graph.DeviceManagement.Administration

$params = @{
	"@odata.type" = "#microsoft.graph.auditEvent"
	displayName = "Display Name value"
	componentName = "Component Name value"
	actor = @{
		"@odata.type" = "microsoft.graph.auditActor"
		type = "Type value"
		auditActorType = "Audit Actor Type value"
		userPermissions = @(
		"User Permissions value"
	)
	applicationId = "Application Id value"
	applicationDisplayName = "Application Display Name value"
	userPrincipalName = "User Principal Name value"
	servicePrincipalName = "Service Principal Name value"
	ipAddress = "Ip Address value"
	userId = "User Id value"
}
activity = "Activity value"
activityDateTime = [System.DateTime]::Parse("2016-12-31T23:59:51.6363086-08:00")
activityType = "Activity Type value"
activityOperationType = "Activity Operation Type value"
activityResult = "Activity Result value"
correlationId = "52effe71-fe71-52ef-71fe-ef5271feef52"
resources = @(
	@{
		"@odata.type" = "microsoft.graph.auditResource"
		displayName = "Display Name value"
		modifiedProperties = @(
			@{
				"@odata.type" = "microsoft.graph.auditProperty"
				displayName = "Display Name value"
				oldValue = "Old Value value"
				newValue = "New Value value"
			}
		)
		type = "Type value"
		auditResourceType = "Audit Resource Type value"
		resourceId = "Resource Id value"
	}
)
category = "Category value"
}

Update-MgDeviceManagementAuditEvent -AuditEventId $auditEventId -BodyParameter $params

This example shows how to use the Update-MgDeviceManagementAuditEvent Cmdlet.

Parameters

-Activity

Friendly name of the activity.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ActivityDateTime

The date time in UTC when the activity was performed.

Parameter properties

Type:System.DateTime
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ActivityOperationType

The HTTP operation type of the activity.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ActivityResult

The result of the activity.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ActivityType

The type of activity that was being performed.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Actor

A class containing the properties for Audit Actor. To construct, see NOTES section for ACTOR properties and create a hash table.

Parameter properties

Type:Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuditActor
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AdditionalProperties

Additional Parameters

Parameter properties

Type:System.Collections.Hashtable
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AuditEventId

The unique identifier of auditEvent

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

UpdateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Update
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BodyParameter

A class containing the properties for Audit Event. To construct, see NOTES section for BODYPARAMETER properties and create a hash table.

Parameter properties

Type:Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuditEvent
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
Update
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

-Category

Audit category.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComponentName

Component name.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
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

-CorrelationId

The client request Id that is used to correlate activity within the system.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisplayName

Event display name.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
Position:Named
Mandatory:False
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

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
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.IDeviceManagementAdministrationIdentity
Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateViaIdentity
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

-Resources

Resources being modified. To construct, see NOTES section for RESOURCES properties and create a hash table.

Parameter properties

Type:

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuditResource[]

Supports wildcards:False
DontShow:False

Parameter sets

UpdateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
UpdateExpanded
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.IDeviceManagementAdministrationIdentity

{{ Fill in the Description }}

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuditEvent

{{ Fill in the Description }}

System.Collections.IDictionary

{{ Fill in the Description }}

Outputs

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuditEvent

{{ 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.

ACTOR <IMicrosoftGraphAuditActor>: A class containing the properties for Audit Actor. [(Any) <Object>]: This indicates any property can be added to this object. [ApplicationDisplayName <String>]: Name of the Application. [ApplicationId <String>]: AAD Application Id. [AuditActorType <String>]: Actor Type. [IPAddress <String>]: IPAddress. [ServicePrincipalName <String>]: Service Principal Name (SPN). [UserId <String>]: User Id. [UserPermissions <String[]>]: List of user permissions when the audit was performed. [UserPrincipalName <String>]: User Principal Name (UPN).

BODYPARAMETER <IMicrosoftGraphAuditEvent>: A class containing the properties for Audit Event. [(Any) <Object>]: This indicates any property can be added to this object. [Id <String>]: The unique identifier for an entity. Read-only. [Activity <String>]: Friendly name of the activity. [ActivityDateTime <DateTime?>]: The date time in UTC when the activity was performed. [ActivityOperationType <String>]: The HTTP operation type of the activity. [ActivityResult <String>]: The result of the activity. [ActivityType <String>]: The type of activity that was being performed. [Actor <IMicrosoftGraphAuditActor>]: A class containing the properties for Audit Actor. [(Any) <Object>]: This indicates any property can be added to this object. [ApplicationDisplayName <String>]: Name of the Application. [ApplicationId <String>]: AAD Application Id. [AuditActorType <String>]: Actor Type. [IPAddress <String>]: IPAddress. [ServicePrincipalName <String>]: Service Principal Name (SPN). [UserId <String>]: User Id. [UserPermissions <String[]>]: List of user permissions when the audit was performed. [UserPrincipalName <String>]: User Principal Name (UPN). [Category <String>]: Audit category. [ComponentName <String>]: Component name. [CorrelationId <String>]: The client request Id that is used to correlate activity within the system. [DisplayName <String>]: Event display name. [Resources <IMicrosoftGraphAuditResource[]>]: Resources being modified. [AuditResourceType <String>]: Audit resource's type. [DisplayName <String>]: Display name. [ModifiedProperties <IMicrosoftGraphAuditProperty[]>]: List of modified properties. [DisplayName <String>]: Display name. [NewValue <String>]: New value. [OldValue <String>]: Old value. [ResourceId <String>]: Audit resource's Id.

INPUTOBJECT <IDeviceManagementAdministrationIdentity>: Identity Parameter [AuditEventId <String>]: The unique identifier of auditEvent [Category <String>]: Usage: category='{category}' [CloudPcAuditEventId <String>]: The unique identifier of cloudPcAuditEvent [CloudPcDeviceImageId <String>]: The unique identifier of cloudPcDeviceImage [CloudPcGalleryImageId <String>]: The unique identifier of cloudPcGalleryImage [CloudPcId <String>]: The unique identifier of cloudPC [CloudPcOnPremisesConnectionId <String>]: The unique identifier of cloudPcOnPremisesConnection [CloudPcProvisioningPolicyAssignmentId <String>]: The unique identifier of cloudPcProvisioningPolicyAssignment [CloudPcProvisioningPolicyId <String>]: The unique identifier of cloudPcProvisioningPolicy [CloudPcUserSettingAssignmentId <String>]: The unique identifier of cloudPcUserSettingAssignment [CloudPcUserSettingId <String>]: The unique identifier of cloudPcUserSetting [ComplianceManagementPartnerId <String>]: The unique identifier of complianceManagementPartner [DeviceAndAppManagementRoleAssignmentId <String>]: The unique identifier of deviceAndAppManagementRoleAssignment [DeviceManagementExchangeConnectorId <String>]: The unique identifier of deviceManagementExchangeConnector [DeviceManagementPartnerId <String>]: The unique identifier of deviceManagementPartner [IosUpdateDeviceStatusId <String>]: The unique identifier of iosUpdateDeviceStatus [MobileThreatDefenseConnectorId <String>]: The unique identifier of mobileThreatDefenseConnector [RemoteAssistancePartnerId <String>]: The unique identifier of remoteAssistancePartner [ResourceOperationId <String>]: The unique identifier of resourceOperation [RoleAssignmentId <String>]: The unique identifier of roleAssignment [RoleDefinitionId <String>]: The unique identifier of roleDefinition [TelecomExpenseManagementPartnerId <String>]: The unique identifier of telecomExpenseManagementPartner [TermsAndConditionsAcceptanceStatusId <String>]: The unique identifier of termsAndConditionsAcceptanceStatus [TermsAndConditionsAssignmentId <String>]: The unique identifier of termsAndConditionsAssignment [TermsAndConditionsId <String>]: The unique identifier of termsAndConditions [UserId <String>]: The unique identifier of user [UserPrincipalName <String>]: Alternate key of user

RESOURCES <IMicrosoftGraphAuditResource[]>: Resources being modified. [AuditResourceType <String>]: Audit resource's type. [DisplayName <String>]: Display name. [ModifiedProperties <IMicrosoftGraphAuditProperty[]>]: List of modified properties. [DisplayName <String>]: Display name. [NewValue <String>]: New value. [OldValue <String>]: Old value. [ResourceId <String>]: Audit resource's Id.