From 2a69010eb97c543d234b0307654453f218d0978c Mon Sep 17 00:00:00 2001 From: Svilen Sultanov Date: Thu, 16 Apr 2020 21:15:53 +0200 Subject: [PATCH] adding named paramerter to import-module --- source/Modules/xExchangeHelper/xExchangeHelper.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Modules/xExchangeHelper/xExchangeHelper.psm1 b/source/Modules/xExchangeHelper/xExchangeHelper.psm1 index f743b1b1..41df3ca2 100644 --- a/source/Modules/xExchangeHelper/xExchangeHelper.psm1 +++ b/source/Modules/xExchangeHelper/xExchangeHelper.psm1 @@ -116,7 +116,7 @@ function Get-RemoteExchangeSession } } - Import-Module $script:DSCExchangeModulePath\$script:DSCExchangeModuleName.psm1 -ArgumentList $session -Global -DisableNameChecking -Force + Import-Module -Name $script:DSCExchangeModulePath\$script:DSCExchangeModuleName.psm1 -ArgumentList $session -Global -DisableNameChecking -Force } } @@ -221,7 +221,7 @@ function Import-RemoteExchangeModule ) Export-PSSession -Session $Session -OutputModule $script:DSCExchangeModulePath - Import-Module $script:DSCExchangeModulePath -Global -DisableNameChecking -Function $CommandsToLoad + Import-Module -Name $script:DSCExchangeModulePath -Global -DisableNameChecking -Function $CommandsToLoad } <#