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

Select-MgProfile beta not working anymore Remove-MgDeviceManagementMicrosoftTunnelHealthThreshold #1186

Closed
pri-kise opened this issue Apr 1, 2022 · 2 comments

Comments

@pri-kise
Copy link

pri-kise commented Apr 1, 2022

Select-MgProfile : Die Funktion "Remove-MgDeviceManagementMicrosoftTunnelHealthThreshold" kann nicht erstellt werden, da die Funktionskapazität 4096 für diesen Bereich überschritten wurde.

Since today I receive a very strange error. Can anybody provide some help?

@ghost ghost added the ToTriage label Apr 1, 2022
@ghost ghost added this to Issues to triage in Graph SDK - Triage Apr 1, 2022
@peombwa
Copy link
Member

peombwa commented Apr 1, 2022

Translated with Microsoft Translator:

Select-MgProfile: The Remove-MgDeviceManagementMicrosoftTunnelHealthThreshold function cannot be created because the function capacity 4096 for this area has been exceeded.

@pri-kise, the error is due to a known PowerShell 5.1 issue - PowerShell/PowerShell#2221. In this case, you've reached the $MaximumFunctionCount in your PS 5.1 session, and Select-MgProfile can't load Remove-MgDeviceManagementMicrosoftTunnelHealthThreshold. The PowerShell team removed the limit in PowerShell core.

Your options are:

  • Upgrade to PowerShell 7+ (highly recommended).
  • Only load the modules that you need.
  • Increase the $MaximumFunctionCount = 10000 to match the number of functions you need before importing the modules.

@pri-kise
Copy link
Author

pri-kise commented Apr 4, 2022

an update to Powershell 7+ is currently not possible, since the same script uses powershell modules that currently don't support the new Powershell version.

For now I got it solved with the other options. Thanks for your help.

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

No branches or pull requests

2 participants