Set-MgUserPhotoContent

Update media content for the navigation property photo in users

Syntax

Set-MgUserPhotoContent
   -UserId <String>
   [-BodyParameter <Stream>]
   -InFile <String>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-MgUserPhotoContent
   -UserId <String>
   -ProfilePhotoId <String>
   [-BodyParameter <Stream>]
   -InFile <String>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-MgUserPhotoContent
   -InputObject <IUsersIdentity>
   [-BodyParameter <Stream>]
   -InFile <String>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-MgUserPhotoContent
   -InputObject <IUsersIdentity>
   [-BodyParameter <Stream>]
   -InFile <String>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Update media content for the navigation property photo in users

Parameters

-BodyParameter

.

Type:Stream
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-InFile

The path to the file to upload. This should include a path and file name. If you omit the path, the current location will be used.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Identity Parameter To construct, please use Get-Help -Online and see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IUsersIdentity
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-PassThru

Returns true when the command succeeds

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProfilePhotoId

key: id of profilePhoto

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserId

key: id of user

Type:String
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Graph.PowerShell.Models.IUsersIdentity

System.IO.Stream

Outputs

System.Boolean

Notes

ALIASES

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.

INPUTOBJECT <IUsersIdentity>: Identity Parameter

  • [AttachmentBaseId <String>]: key: id of attachmentBase
  • [AttachmentId <String>]: key: id of attachment
  • [AttachmentSessionId <String>]: key: id of attachmentSession
  • [ChecklistItemId <String>]: key: id of checklistItem
  • [DirectoryObjectId <String>]: key: id of directoryObject
  • [ExtensionId <String>]: key: id of extension
  • [LicenseDetailsId <String>]: key: id of licenseDetails
  • [LinkedResourceId <String>]: key: id of linkedResource
  • [MultiValueLegacyExtendedPropertyId <String>]: key: id of multiValueLegacyExtendedProperty
  • [NotificationId <String>]: key: id of notification
  • [OAuth2PermissionGrantId <String>]: key: id of oAuth2PermissionGrant
  • [OutlookCategoryId <String>]: key: id of outlookCategory
  • [OutlookTaskFolderId <String>]: key: id of outlookTaskFolder
  • [OutlookTaskGroupId <String>]: key: id of outlookTaskGroup
  • [OutlookTaskId <String>]: key: id of outlookTask
  • [ProfilePhotoId <String>]: key: id of profilePhoto
  • [SingleValueLegacyExtendedPropertyId <String>]: key: id of singleValueLegacyExtendedProperty
  • [TodoTaskId <String>]: key: id of todoTask
  • [TodoTaskListId <String>]: key: id of todoTaskList
  • [UserId <String>]: key: id of user