Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-MgUserPhotoContent not working in PowerShell 5 #2645

Closed
timayabi2020 opened this issue Mar 25, 2024 · 3 comments · Fixed by #2661
Closed

Set-MgUserPhotoContent not working in PowerShell 5 #2645

timayabi2020 opened this issue Mar 25, 2024 · 3 comments · Fixed by #2661

Comments

@timayabi2020
Copy link
Contributor

Thanks for reporting the bug. Please ensure you've gone through the following checklist before opening an issue:

Describe the bug

The command fails with missing assembly error Microsoft.Win32.Registry.dll when used in a PowerShell 5 environment.

To Reproduce
Steps to reproduce the behavior:

  1. Open PowerShell 5
  2. Connect to graph using connect-mggraph -scopes "ProfilePhoto.ReadWrite.All,User.ReadWrite,User.ReadWrite.All"
  3. Execute Set-MgUserPhotoContent -UserId <UserId> -InFile "<Path to your image file>"

Expected behavior

No error thrown

Debug Output

Module Version
2.16.0

Environment Data
PowerShell 5

Screenshots

image

Additional context

The cmdlet works in PowerShell 7

@MaKraMc
Copy link

MaKraMc commented Mar 26, 2024

I have the same Issue. Using module version 2.12.0 has worked fine for me.

@MaKraMc
Copy link

MaKraMc commented Mar 26, 2024

There is also a discussion about this over on microsoft learn.

@timayabi2020
Copy link
Contributor Author

Thanks @MaKraMc, we are working to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants