I am getting the below error when importing the "AzureAD" powershell module. I have installed the module, unable to import it. I have checked to see if there are any prerequisites required, nothing mentioned in GitHub.
Earlier, I was able to install and import "AZ" module.
UPDATE : Resolved one dependency by copying the system.windows.forms.dll, but more runtime errors...
Name Value
---- -----
PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
VERBOSE: Loading module from path 'C:\Program Files\PowerShell\Modules\AzureAd\2.0.2.76\AzureAd.psd1'. VERBOSE: Loading 'FormatsToProcess' from path 'C:\Program Files\PowerShell\Modules\AzureAd\2.0.2.76\AzureAD.Format.ps1xml'. VERBOSE: Populating RepositorySourceLocation property for module AzureAd. VERBOSE: Loading module from path 'C:\Program Files\PowerShell\Modules\AzureAd\2.0.2.76\Microsoft.Open.Azure.AD.CommonLibrary.dll'. Import-Module : Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified. At line:1 char:1 + Import-Module -Name AzureAd -Scope Global -Verbose + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand