Skip to content

Commit

Permalink
Ver 1,3,1
Browse files Browse the repository at this point in the history
  • Loading branch information
cgoosen committed Nov 23, 2023
1 parent a2a3378 commit f743eac
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Connect-365.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
None
.NOTES
Version: 1.3
Version: 1.3.1
Author: Chris Goosen (Twitter: @chrisgoosen)
Creation Date: 26 Feb 2023
Credits: ExchangeMFAModule handling by Michel de Rooij - eightwone.com, @mderooij
Creation Date: 23 Nov 2023
Credits: Ver >= 1.3 ExchangeMFAModule handling by Michel de Rooij - eightwone.com, @mderooij
Bugfinder extraordinaire Greig Sheridan - greiginsydney.com, @greiginsydney
Various bugfixes: Andy Helsby - github.com/Absoblogginlutely
Expand All @@ -26,7 +26,7 @@
.\Connect-365.ps1
#>
$ErrorActionPreference = "Stop"
$ScriptVersion = "1.3"
$ScriptVersion = "1.3.1"
$ScriptName = "Connect365"
$ScriptDisplayName = "Connect-365"
$ScriptURL = "https://github.com/cgoosen/Connect-365/releases/"
Expand Down Expand Up @@ -313,15 +313,9 @@ Function Get-ModuleInfo-SPO{
}
}

# ExchangeMFAModule handling by Michel de Rooij - eightwone.com, @mderooij
Function Get-ModuleInfo-EXO{
try {
$ExchangeMFAModule = 'Microsoft.Exchange.Management.ExoPowershellModule'
$ModuleList = @(Get-ChildItem -Path "$($env:LOCALAPPDATA)\Apps\2.0" -Filter "$($ExchangeMFAModule).manifest" -Recurse ) | Sort-Object LastWriteTime -Desc | Select-Object -First 1
If ( $ModuleList) {
$ModuleName = Join-path -Path $ModuleList[0].Directory.FullName -ChildPath "$($ExchangeMFAModule).dll"
}
Import-Module -FullyQualifiedName $ModuleName -Force
Import-Module ExchangeOnlineManagement
return $true
}
catch {
Expand Down

0 comments on commit f743eac

Please sign in to comment.