Skip to content

Commit 81c5477

Browse files
committed
Change order of monkeycloudutils internal module
1 parent 1d1037f commit 81c5477

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

Invoke-Monkey365.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,6 @@ Function Invoke-Monkey365{
446446
If (-not (Get-Module -Name monkeymsal)) {
447447
Import-Module $MSAL -ArgumentList $PSBoundParameters['ForceMsalDesktop']
448448
}
449-
#Import Cloud Utils module
450-
$cloudUtils = Join-Path $Script:ScriptPath 'core/modules/monkeycloudutils/monkeycloudutils.psd1'
451-
Import-Module -Name $cloudUtils
452449
#Start Time
453450
$starttimer = Get-Date
454451
#####Get Default parameters ########

core/utils/Register-Monkey365Application.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ Function Register-Monkey365Application {
115115
$requiredResourceAccessList = [System.Collections.Generic.List[System.Collections.Hashtable]]::new()
116116
#Set list for role assignments
117117
$requiredRoleList = [System.Collections.Generic.List[System.String]]::new();
118-
$MSAL = ("{0}{1}core/modules/monkeymsal" -f $O365Object.Localpath,[System.IO.Path]::DirectorySeparatorChar)
119-
Import-Module $MSAL -Scope Global -Force
118+
#Import MSAL module
119+
$MSAL = Join-Path $O365Object.Localpath '/core/modules/monkeymsal/monkeymsal.psd1'
120+
If (-not (Get-Module -Name monkeymsal)) {
121+
Import-Module $MSAL
122+
}
120123
$msalAppMetadata = New-Object -TypeName "System.Management.Automation.CommandMetaData" (Get-Command -Name "New-MonkeyMsalApplication")
121124
#Set new dict
122125
$newPsboundParams = [ordered]@{}

monkey365.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ RequiredModules = @()
6969
NestedModules = @(
7070
'core/modules/monkeyutils/monkeyutils.psm1'
7171
'core/modules/monkeylogger/monkeylogger.psm1'
72-
#'core/modules/monkeycloudutils/monkeycloudutils.psm1'
72+
'core/modules/monkeycloudutils/monkeycloudutils.psm1'
7373
'core/modules/monkeyhttpwebrequest/monkeyhttpwebrequest.psm1'
7474
'core/modules/psmarkdig/psmarkdig.psm1'
7575
'core/modules/monkeyhtml/monkeyhtml.psm1'

0 commit comments

Comments
 (0)