You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched and found no existing issue, I did make a comment in Issue 8198 which has been closed and merged. But this issue with PSRemote and dbatools persists.
What error did you receive?
MethodInvocationException: C:\Users\Administrator\Documents\PowerShell\Modules\dbatools\1.1.140\internal\scripts\libraryimport.ps1:150
Line |
150 | [Reflection.Assembly]::LoadFrom($assemblyPath)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly
| 'C:\Users\Administrator\Documents\PowerShell\Modules\dbatools\1.1.140\bin\smo\coreclr\Microsoft.SqlServer.XE.Core.dll'. The specified module could not be found."
Could not import C:\Users\Administrator\Documents\PowerShell\Modules\dbatools\1.1.140\bin\smo\coreclr\Microsoft.SqlServer.XEvent.Linq.dll :
MethodInvocationException: C:\Users\Administrator\Documents\PowerShell\Modules\dbatools\1.1.140\internal\scripts\libraryimport.ps1:150
Line |
150 | [Reflection.Assembly]::LoadFrom($assemblyPath)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly
| 'C:\Users\Administrator\Documents\PowerShell\Modules\dbatools\1.1.140\bin\smo\coreclr\Microsoft.SqlServer.XEvent.Linq.dll'. The specified module could not be found."
Steps to Reproduce
# provide your command(s) executed pertaining to dbatools# please include variable values (redacted or fake if needed) for reference
Run the following PowerShell block over either WinRM or PowerShell remote tools:
Import-Module-Name "dbatools"
However, importing DBAtools over RDP works fine when running the same Import-Module snippit above.
Please note, this issue does not occur in DBA tools version "1.0.114" and below, only in later versions. This same issue was identified by @wsuhoey in Issue 8198 but in the latest version of DBAtools v1.1.140 I'm still seeing the same errors and Issue 8198 has now been closed and merged into the latest release which is v1.1.140 at time of writing.
Please confirm that you are running the most recent version of dbatools
ModuleType Version PreRelease Name ExportedCommands
Thanks for the report. I'm currently working on updating the library and the XE libraries will disappear entirely (not sure where they went tho ???) so keep a lookout. For reference: microsoft/sqlmanagementobjects#114
Verified issue does not already exist?
I have searched and found no existing issue, I did make a comment in Issue 8198 which has been closed and merged. But this issue with PSRemote and dbatools persists.
What error did you receive?
Steps to Reproduce
However, importing DBAtools over RDP works fine when running the same Import-Module snippit above.
Please note, this issue does not occur in DBA tools version "1.0.114" and below, only in later versions. This same issue was identified by @wsuhoey in Issue 8198 but in the latest version of DBAtools v1.1.140 I'm still seeing the same errors and Issue 8198 has now been closed and merged into the latest release which is v1.1.140 at time of writing.
Please confirm that you are running the most recent version of dbatools
ModuleType Version PreRelease Name ExportedCommands
Script 1.1.140 dbatools {Select-DbaObject, Set-DbatoolsConfig, Add-DbaAgDatabase, Add-DbaAgListener…}
Other details or mentions
None.
What PowerShell host was used when producing this error
PowerShell Core (pwsh.exe), VS Code (terminal), VS Code (integrated terminal)
PowerShell Host Version
Name Value
PSVersion 7.2.6
PSEdition Core
GitCommitId 7.2.6
OS Linux 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
SQL Server Edition and Build number
SQLServer2017 and build number 14.0.3436.1
.NET Framework Version
.NET 6.0.8
The text was updated successfully, but these errors were encountered: