dsccommunity/ExchangeDsc

xExchangeHelper.psm1 - Export-PSSession not creating temporary directory Server 2019

erjenkin opened this issue · 2 comments

Problem description

I found that something may have changed from an OS (Server2019) perspective that isn't allowing the following command to succeed:
Export-PSSession -Session $Session -OutputModule $script:DSCExchangeModulePath

When attempting to use the config on a newly deployed exchange server an error regarding -OutModule would be displayed

image

Verbose logs

See above

DSC configuration

xExchDatabaseAvailabilityGroup DAG
        {
            Name                           = 'DAG1'
            Credential                     = $DomainCreds
            AutoDagTotalNumberOfServers    = 4
            AutoDagDatabaseCopiesPerVolume = 2
            DatacenterActivationMode       = 'DagOnly'
            SkipDagValidation              = $true
            WitnessDirectory               = 'Z:\witness01\DAG01'
            WitnessServer                  = $witnessServer
            AutoDagAutoReseedEnabled       = $true
        }

Suggested solution

#UPDATE xExchangeHelper.psm1#

Line 3
New-Item -Path $script:DSCExchangeModulePath -Type Directory -Force

Line 81
$exportedModule = Test-Path -Path $script:DSCExchangeModulePath$script:DSCExchangeModuleName.psm1

Line 224
Export-PSSession -Session $Session -OutputModule $script:DSCExchangeModulePath -Force

Operating system the target node is running

WindowsProductName : Windows Server 2019 Datacenter

Exchange Server edition and version the target node is running

Version 15.2 ‎(Build 858.5)‎

PowerShell version and build the target node is running

5.1.17763.2803

xExchange version

Tested with 1.32 & 1.33

This happens also on Windows 2016 with Exchange 2016.

Hi @erjenkin how can I help with this? I have the same problem... 🆘