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

New-OnPremiseHybridWorker fails in PS 7 #69

Open
jitterbox opened this issue Oct 15, 2020 · 0 comments
Open

New-OnPremiseHybridWorker fails in PS 7 #69

jitterbox opened this issue Oct 15, 2020 · 0 comments

Comments

@jitterbox
Copy link

Running New-OnPremiseHybridWorker in PowerShell 7 fails with the following error:
Exception: C:\Users\theboss\Documents\PowerShell\Scripts\New-OnPremiseHybridWorker.ps1:385 Line | 385 | throw "The HybridRegistration module was not found. Please ensure … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | The HybridRegistration module was not found. Please ensure the Microsoft Monitoring Agent was | correctly installed.

The failure seems to be on
Import-Module .\HybridRegistration.psd1
...which returns
Import-Module: Could not load type 'System.Web.HttpException' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

This works in PowerShell 5.1, but I'm not able to run the full script in 5.1 because I need to retain the AzureRM module. I don't want to downgrade to PowerShell 6...

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

No branches or pull requests

1 participant