Gerenios / AADInternals

AADInternals PowerShell module for administering Azure AD and Office 365
http://aadinternals.com/aadinternals
MIT License
1.27k stars 216 forks source link

PowerShell 7 compatibility fix #100

Open martin-haller opened 1 month ago

martin-haller commented 1 month ago

It looks like PowerShell v7 behaves differently and instead of OutFile set to Null it sets it to empty string. It makes the following call to Invoke-WebRequest to fail:

Invoke-WebRequest: C:\Program Files\WindowsPowerShell\Modules\AADInternals\0.9.4\CommonUtils.ps1:2899:27
Line |
2899 |          Invoke-WebRequest @arguments
     |                            ~~~~~~~~~~
     | Cannot validate argument on parameter 'OutFile'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

It should fix the issue #94