azureautomation / runbooks

Sample Automation runbooks
MIT License
150 stars 128 forks source link

Module "HybridRegistration" can not be imported in PowerShell 7.x #95

Open AspenForester opened 1 year ago

AspenForester commented 1 year ago

https://github.com/azureautomation/runbooks/blob/bb51e59aaa9d93c8662abae29745e4225a9d076f/Utility/ARM/New-OnPremiseHybridWorker.ps1#L384

"HybridRegistration" can not be imported in PowerShell 7, but if the script detected what version of PowerShell it was executing in, it could make the choice to import the module using the '-UseWindowsPowerShell` switch.