Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
erjenkin opened this issue Apr 21, 2022 · 2 comments · Fixed by #486 or #489
Closed

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

erjenkin opened this issue Apr 21, 2022 · 2 comments · Fixed by #486 or #489
Labels
bug The issue is a bug.

Comments

@erjenkin
Copy link

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
@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Apr 22, 2022
@HironariYo
Copy link

This happens also on Windows 2016 with Exchange 2016.

@RenatoMorenoR
Copy link
Contributor

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

@johlju johlju removed the help wanted The issue is up for grabs for anyone in the community. label Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug.
Projects
None yet
4 participants