Closed aguzev closed 1 year ago
@barkz , what happens when you follow these steps?
I have reproduced the issue on Ubuntu.
It's a bug in dbatools 1.1. Downgrading to the most recent 1.0.x resolves the issue.
Surprisingly, they released dbatools 2.0.0 today and it does not have this bug. But upgrading to dbatools 2.0 requires full regression testing for PureStoragePowerShellToolkit.DatabaseTools.
Review issue with Import- PS1s.
PS Microsoft.PowerShell.Core\FileSystem::\Mac\Home\Desktop\github-purestorage\powershell-toolkit-3> .\Import-PureStoragePowerShellToolkit.Core.ps1 Import PureStoragePowershellToolkit.FlashArray Import PureStoragePowershellToolkit.DatabaseTools Import-Module: \Mac\Home\Desktop\github-purestorage\powershell-toolkit-3\Import-PureStoragePowerShellToolkit.Core.ps1:46 Line | 46 | Import-Module ".\$ModuleName" |
~~~~~~~ | Could not import | \Mac\Home\Documents\PowerShell\Modules\dbatools\1.1.146\bin\smo\coreclr\Microsoft.SqlServer.XE.Core.dll : | MethodInvocationException: | \Mac\Home\Documents\PowerShell\Modules\dbatools\1.1.146\internal\scripts\libraryimport.ps1:150 Line | 150 | | [Reflection.Assembly]::LoadFrom($assemblyPath) | | ~~~~~~~~~~~~ | Exception calling "LoadFrom" with "1" argument(s): "Could | not load file or assembly | | '\Mac\Home\Documents\PowerShell\Modules\dbatools\1.1.146\bin\smo\coreclr\Microsoft.SqlServer.XE.Core.dll'. The | | specified module could not be found." PS Microsoft.PowerShell.Core\FileSystem::\Mac\Home\Desktop\github-purestorage\powershell-toolkit-3> .\Import-PureStoragePowerShellToolkit.ps1 Import PureStoragePowershellToolkit.FlashArray Import PureStoragePowershellToolkit.DatabaseTools Import PureStoragePowershellToolkit.WindowsAdministration Import PureStoragePowershellToolkit.Reporting Import PureStoragePowershellToolkit.Exchange