We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90b1829 commit ed5bf53Copy full SHA for ed5bf53
1 file changed
dbatools.psm1
@@ -52,7 +52,12 @@ if (-not $script:libraryroot) {
52
}
53
54
try {
55
- $dll = [System.IO.Path]::Combine($script:libraryroot, "dbatools.dll")
+ # if core add core to the path, otherwise add desktop
56
+ if ($PSVersionTable.PSEdition -eq 'Core') {
57
+ $script:libraryroot = [System.IO.Path]::Combine($script:libraryroot, 'core', 'dbatools.dll')
58
+ } else {
59
+ $script:libraryroot = [System.IO.Path]::Combine($script:libraryroot, 'desktop', 'dbatools.dll')
60
+ }
61
Import-Module $dll
62
} catch {
63
throw "Couldn't import dbatools library | $PSItem"
0 commit comments